Class: Command::RecordingInterpreter::Execute

Inherits:
Event
  • Object
show all
Defined in:
lib/command-set/interpreter/recording.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line) ⇒ Execute

Returns a new instance of Execute.



49
50
51
52
# File 'lib/command-set/interpreter/recording.rb', line 49

def initialize(line)
  @line = line
  @result = nil
end

Instance Attribute Details

#result=(value) ⇒ Object (writeonly)

Sets the attribute result

Parameters:

  • value

    the value to set the attribute result to.



59
60
61
# File 'lib/command-set/interpreter/recording.rb', line 59

def result=(value)
  @result = value
end

Instance Method Details

#playback(prompt, interpreter, previous) ⇒ Object



54
55
56
57
# File 'lib/command-set/interpreter/recording.rb', line 54

def playback(prompt, interpreter, previous)
  puts "\n" + prompt + @line
  interpreter.process_input(@line)
end