Class: Command::RecordingInterpreter::Execute
- Defined in:
- lib/command-set/interpreter/recording.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
writeonly
Sets the attribute result.
Instance Method Summary collapse
-
#initialize(line) ⇒ Execute
constructor
A new instance of Execute.
- #playback(prompt, interpreter, previous) ⇒ Object
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
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 |