Module: PopInstruction
- Included in:
- BoolPopInstruction, CodePopInstruction, ExecPopInstruction, FloatPopInstruction, IntPopInstruction, NamePopInstruction
- Defined in:
- lib/instructions/infrastructure.rb
Instance Attribute Summary collapse
-
#target_stack ⇒ Object
readonly
Returns the value of attribute target_stack.
Instance Method Summary collapse
- #cleanup ⇒ Object
- #derive ⇒ Object
- #initialize(context, target_stack) ⇒ Object
- #preconditions? ⇒ Boolean
- #setup ⇒ Object
Instance Attribute Details
#target_stack ⇒ Object (readonly)
Returns the value of attribute target_stack.
123 124 125 |
# File 'lib/instructions/infrastructure.rb', line 123 def target_stack @target_stack end |
Instance Method Details
#cleanup ⇒ Object
138 139 |
# File 'lib/instructions/infrastructure.rb', line 138 def cleanup end |
#derive ⇒ Object
136 137 |
# File 'lib/instructions/infrastructure.rb', line 136 def derive end |
#initialize(context, target_stack) ⇒ Object
125 126 127 128 |
# File 'lib/instructions/infrastructure.rb', line 125 def initialize(context, target_stack) @target_stack = target_stack super(context) end |
#preconditions? ⇒ Boolean
130 131 132 |
# File 'lib/instructions/infrastructure.rb', line 130 def preconditions? needs @target_stack, 1 end |
#setup ⇒ Object
133 134 135 |
# File 'lib/instructions/infrastructure.rb', line 133 def setup @result = @context.pop(@target_stack) end |