Class: RBS::AST::Ruby::Members::MixinMember
- Defined in:
- lib/rbs/ast/ruby/members.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(buffer, node, module_name, annotation) ⇒ MixinMember
constructor
A new instance of MixinMember.
- #location ⇒ Object
- #name_location ⇒ Object
- #type_args ⇒ Object
- #type_fingerprint ⇒ Object
Methods included from Helpers::LocationHelper
Constructor Details
#initialize(buffer, node, module_name, annotation) ⇒ MixinMember
Returns a new instance of MixinMember.
598 599 600 601 602 603 |
# File 'lib/rbs/ast/ruby/members.rb', line 598 def initialize(buffer, node, module_name, annotation) super(buffer) @node = node @module_name = module_name @annotation = annotation end |
Instance Attribute Details
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
596 597 598 |
# File 'lib/rbs/ast/ruby/members.rb', line 596 def annotation @annotation end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
595 596 597 |
# File 'lib/rbs/ast/ruby/members.rb', line 595 def module_name @module_name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
594 595 596 |
# File 'lib/rbs/ast/ruby/members.rb', line 594 def node @node end |
Instance Method Details
#location ⇒ Object
605 606 607 |
# File 'lib/rbs/ast/ruby/members.rb', line 605 def location rbs_location(node.location) end |
#name_location ⇒ Object
609 610 611 612 613 614 |
# File 'lib/rbs/ast/ruby/members.rb', line 609 def name_location args = node.arguments or raise first_arg = args.arguments.first or raise rbs_location(first_arg.location) end |
#type_args ⇒ Object
616 617 618 |
# File 'lib/rbs/ast/ruby/members.rb', line 616 def type_args annotation&.type_args || [] end |
#type_fingerprint ⇒ Object
620 621 622 623 624 625 626 627 |
# File 'lib/rbs/ast/ruby/members.rb', line 620 def type_fingerprint [ "members/mixin", self.class.name, module_name.to_s, annotation&.type_fingerprint ] end |