Class: Rvm2::Shell::Runner::Fake
- Inherits:
-
Object
- Object
- Rvm2::Shell::Runner::Fake
- Defined in:
- lib/rvm2/shell/runner/fake.rb
Instance Attribute Summary collapse
-
#last_status ⇒ Object
readonly
Returns the value of attribute last_status.
Instance Method Summary collapse
Instance Attribute Details
#last_status ⇒ Object (readonly)
Returns the value of attribute last_status.
2 3 4 |
# File 'lib/rvm2/shell/runner/fake.rb', line 2 def last_status @last_status end |
Instance Method Details
#execute(command) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/rvm2/shell/runner/fake.rb', line 4 def execute(command) @last_status, outputs = @respond.call(command) outputs.each do |out, err| yield(out, err) end @last_status end |
#respond(&block) ⇒ Object
12 13 14 |
# File 'lib/rvm2/shell/runner/fake.rb', line 12 def respond(&block) @respond = block end |