Class: Kumi::Core::NAST::Ref

Inherits:
Node
  • Object
show all
Defined in:
lib/kumi/core/nast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#id, #loc, #meta

Instance Method Summary collapse

Constructor Details

#initialize(name:, **k) ⇒ Ref

Returns a new instance of Ref.



63
64
65
66
# File 'lib/kumi/core/nast.rb', line 63

def initialize(name:, **k)
  super(**k)
  @name = name.to_sym
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



61
62
63
# File 'lib/kumi/core/nast.rb', line 61

def name
  @name
end

Instance Method Details

#accept(visitor) ⇒ Object



68
69
70
# File 'lib/kumi/core/nast.rb', line 68

def accept(visitor)
  visitor.visit_ref(self)
end