Module: FlushInstruction
- Included in:
- BoolFlushInstruction, CodeFlushInstruction, ExecFlushInstruction, FloatFlushInstruction, IntFlushInstruction, NameFlushInstruction
- 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.
239 240 241 |
# File 'lib/instructions/infrastructure.rb', line 239 def target_stack @target_stack end |
Instance Method Details
#cleanup ⇒ Object
253 254 255 |
# File 'lib/instructions/infrastructure.rb', line 253 def cleanup @context.stacks[@target_stack].clear end |
#derive ⇒ Object
251 252 |
# File 'lib/instructions/infrastructure.rb', line 251 def derive end |
#initialize(context, target_stack) ⇒ Object
241 242 243 244 |
# File 'lib/instructions/infrastructure.rb', line 241 def initialize(context, target_stack) @target_stack = target_stack super(context) end |
#preconditions? ⇒ Boolean
246 247 248 |
# File 'lib/instructions/infrastructure.rb', line 246 def preconditions? @context.stacks[@target_stack].depth != nil end |
#setup ⇒ Object
249 250 |
# File 'lib/instructions/infrastructure.rb', line 249 def setup end |