Module: FlushInstruction

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#target_stackObject (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

#cleanupObject



253
254
255
# File 'lib/instructions/infrastructure.rb', line 253

def cleanup
  @context.stacks[@target_stack].clear
end

#deriveObject



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

Returns:

  • (Boolean)


246
247
248
# File 'lib/instructions/infrastructure.rb', line 246

def preconditions?
  @context.stacks[@target_stack].depth != nil
end

#setupObject



249
250
# File 'lib/instructions/infrastructure.rb', line 249

def setup
end