Class: Atomy::Code::InstanceVariable

Inherits:
Object
  • Object
show all
Defined in:
lib/atomy/code/instance_variable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ InstanceVariable

Returns a new instance of InstanceVariable.



6
7
8
# File 'lib/atomy/code/instance_variable.rb', line 6

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/atomy/code/instance_variable.rb', line 4

def name
  @name
end

Instance Method Details

#bytecode(gen, mod) ⇒ Object



10
11
12
# File 'lib/atomy/code/instance_variable.rb', line 10

def bytecode(gen, mod)
  gen.push_ivar(:"@#{@name}")
end