Class: BfInterpreter::BfProgramUnit

Inherits:
Object
  • Object
show all
Defined in:
lib/yarbf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instruction) ⇒ BfProgramUnit

Returns a new instance of BfProgramUnit.



159
160
161
162
163
# File 'lib/yarbf.rb', line 159

def initialize(instruction)
  @instruction = instruction
  @match = nil
  @next = nil
end

Instance Attribute Details

#instructionObject (readonly)

Returns the value of attribute instruction.



154
155
156
# File 'lib/yarbf.rb', line 154

def instruction
  @instruction
end

#matchObject

Returns the value of attribute match.



156
157
158
# File 'lib/yarbf.rb', line 156

def match
  @match
end

#nextObject

Returns the value of attribute next.



157
158
159
# File 'lib/yarbf.rb', line 157

def next
  @next
end