Class: RBS::AST::Ruby::Members::InstanceVariableMember

Inherits:
Base
  • Object
show all
Defined in:
lib/rbs/ast/ruby/members.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#buffer

Instance Method Summary collapse

Methods included from Helpers::LocationHelper

#rbs_location

Constructor Details

#initialize(buffer, annotation) ⇒ InstanceVariableMember

Returns a new instance of InstanceVariableMember.



696
697
698
699
# File 'lib/rbs/ast/ruby/members.rb', line 696

def initialize(buffer, annotation)
  super(buffer)
  @annotation = annotation
end

Instance Attribute Details

#annotationObject (readonly)

Returns the value of attribute annotation.



694
695
696
# File 'lib/rbs/ast/ruby/members.rb', line 694

def annotation
  @annotation
end

Instance Method Details

#locationObject



709
710
711
# File 'lib/rbs/ast/ruby/members.rb', line 709

def location
  annotation.location
end

#nameObject



701
702
703
# File 'lib/rbs/ast/ruby/members.rb', line 701

def name
  annotation.ivar_name
end

#typeObject



705
706
707
# File 'lib/rbs/ast/ruby/members.rb', line 705

def type
  annotation.type
end

#type_fingerprintObject



713
714
715
716
717
718
# File 'lib/rbs/ast/ruby/members.rb', line 713

def type_fingerprint
  [
    "members/instance_variable",
    annotation.type_fingerprint
  ]
end