Class: Whitespace::ISA::Instruction
- Inherits:
-
Object
- Object
- Whitespace::ISA::Instruction
- Defined in:
- lib/whitespace/instructions/instruction.rb
Direct Known Subclasses
Binop, Call, Discard, Dup, End, Label, Njmp, Push, Putc, Putn, Readc, Readn, Retrieve, Return, Store, Swap, Ujmp, Zjmp
Instance Attribute Summary collapse
-
#vm ⇒ Object
readonly
Returns the value of attribute vm.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(vm) ⇒ Instruction
constructor
A new instance of Instruction.
Constructor Details
#initialize(vm) ⇒ Instruction
Returns a new instance of Instruction.
5 6 7 |
# File 'lib/whitespace/instructions/instruction.rb', line 5 def initialize(vm) @vm = vm end |
Instance Attribute Details
#vm ⇒ Object (readonly)
Returns the value of attribute vm.
3 4 5 |
# File 'lib/whitespace/instructions/instruction.rb', line 3 def vm @vm end |
Instance Method Details
#execute ⇒ Object
9 10 11 |
# File 'lib/whitespace/instructions/instruction.rb', line 9 def execute raise NotImplementedError end |