Class: RBS::AST::Ruby::Members::DefMember
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Base
|
|
|
Instance Chain:
|
|
| Inherits: |
RBS::AST::Ruby::Members::Base
|
| Defined in: | lib/rbs/ast/ruby/members.rb |
Constant Summary
Class Method Summary
Base - Inherited
Instance Attribute Summary
- #instance? ⇒ Boolean readonly
- #kind readonly
- #leading_comment readonly
- #method_type readonly
- #name readonly
- #node readonly
- #overloading? ⇒ Boolean readonly
- #singleton? ⇒ Boolean readonly
Base - Inherited
Instance Method Summary
::RBS::AST::Ruby::Helpers::LocationHelper - Included
Constructor Details
.new(buffer, name, node, method_type, leading_comment, kind: :instance) ⇒ DefMember
# File 'lib/rbs/ast/ruby/members.rb', line 556
def initialize(buffer, name, node, method_type, leading_comment, kind: :instance) super(buffer) @name = name @node = node @kind = kind @method_type = method_type @leading_comment = leading_comment end
Instance Attribute Details
#instance? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/rbs/ast/ruby/members.rb', line 569
def instance? kind == :instance end
#kind (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 552
attr_reader :kind
#leading_comment (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 554
attr_reader :leading_comment
#method_type (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 553
attr_reader :method_type
#name (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 550
attr_reader :name
#node (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 551
attr_reader :node
#overloading? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/rbs/ast/ruby/members.rb', line 581
def overloading? method_type.overloading? end
#singleton? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/rbs/ast/ruby/members.rb', line 565
def singleton? kind == :singleton end
Instance Method Details
#annotations
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 585
def annotations [] end
#location
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 573
def location rbs_location(node.location) end
#name_location
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 589
def name_location rbs_location(node.name_loc) end
#overloads
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 577
def overloads method_type.overloads end
#type_fingerprint
[ GitHub ]# File 'lib/rbs/ast/ruby/members.rb', line 593
def type_fingerprint [ "members/def", kind.to_s, name.to_s, method_type.type_fingerprint, leading_comment&.as_comment&.string ] end