Class: RBS::AST::Ruby::Members::DefMember
- Defined in:
- lib/rbs/ast/ruby/members.rb
Constant Summary collapse
- Overload =
AST::Members::MethodDefinition::Overload
Instance Attribute Summary collapse
-
#leading_comment ⇒ Object
readonly
Returns the value of attribute leading_comment.
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Attributes inherited from Base
Instance Method Summary collapse
- #annotations ⇒ Object
-
#initialize(buffer, name, node, method_type, leading_comment) ⇒ DefMember
constructor
A new instance of DefMember.
- #location ⇒ Object
- #name_location ⇒ Object
- #overloading? ⇒ Boolean
- #overloads ⇒ Object
- #type_fingerprint ⇒ Object
Methods included from Helpers::LocationHelper
Constructor Details
#initialize(buffer, name, node, method_type, leading_comment) ⇒ DefMember
Returns a new instance of DefMember.
555 556 557 558 559 560 561 |
# File 'lib/rbs/ast/ruby/members.rb', line 555 def initialize(buffer, name, node, method_type, leading_comment) super(buffer) @name = name @node = node @method_type = method_type @leading_comment = leading_comment end |
Instance Attribute Details
#leading_comment ⇒ Object (readonly)
Returns the value of attribute leading_comment.
553 554 555 |
# File 'lib/rbs/ast/ruby/members.rb', line 553 def leading_comment @leading_comment end |
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
552 553 554 |
# File 'lib/rbs/ast/ruby/members.rb', line 552 def method_type @method_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
550 551 552 |
# File 'lib/rbs/ast/ruby/members.rb', line 550 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
551 552 553 |
# File 'lib/rbs/ast/ruby/members.rb', line 551 def node @node end |
Instance Method Details
#annotations ⇒ Object
575 576 577 |
# File 'lib/rbs/ast/ruby/members.rb', line 575 def annotations [] end |
#location ⇒ Object
563 564 565 |
# File 'lib/rbs/ast/ruby/members.rb', line 563 def location rbs_location(node.location) end |
#name_location ⇒ Object
579 580 581 |
# File 'lib/rbs/ast/ruby/members.rb', line 579 def name_location rbs_location(node.name_loc) end |
#overloading? ⇒ Boolean
571 572 573 |
# File 'lib/rbs/ast/ruby/members.rb', line 571 def overloading? method_type.overloading? end |
#overloads ⇒ Object
567 568 569 |
# File 'lib/rbs/ast/ruby/members.rb', line 567 def overloads method_type.overloads end |
#type_fingerprint ⇒ Object
583 584 585 586 587 588 589 590 |
# File 'lib/rbs/ast/ruby/members.rb', line 583 def type_fingerprint [ "members/def", name.to_s, method_type.type_fingerprint, leading_comment&.as_comment&.string ] end |