Class: CfScript::Executor::Recorder
- Inherits:
-
Object
- Object
- CfScript::Executor::Recorder
- Defined in:
- lib/cf_script/executor/recorder.rb
Instance Attribute Summary collapse
-
#executions ⇒ Object
readonly
Returns the value of attribute executions.
Instance Method Summary collapse
- #dump ⇒ Object
- #execute(env, command_line) ⇒ Object
-
#initialize(executor = nil) ⇒ Recorder
constructor
A new instance of Recorder.
Constructor Details
#initialize(executor = nil) ⇒ Recorder
Returns a new instance of Recorder.
4 5 6 7 |
# File 'lib/cf_script/executor/recorder.rb', line 4 def initialize(executor = nil) @executions = [] @executor = executor || CfScript.config.runtime.executor end |
Instance Attribute Details
#executions ⇒ Object (readonly)
Returns the value of attribute executions.
2 3 4 |
# File 'lib/cf_script/executor/recorder.rb', line 2 def executions @executions end |
Instance Method Details
#dump ⇒ Object
15 16 17 |
# File 'lib/cf_script/executor/recorder.rb', line 15 def dump puts @executions.join("\n") end |
#execute(env, command_line) ⇒ Object
9 10 11 12 13 |
# File 'lib/cf_script/executor/recorder.rb', line 9 def execute(env, command_line) @executions << command_line @executor.execute(env, command_line) end |