Class: ProcessOutputWrapper::Whenever
- Inherits:
-
Object
- Object
- ProcessOutputWrapper::Whenever
- Defined in:
- lib/process_output_wrapper/whenever.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #do(&result) ⇒ Object
-
#initialize(&condition) ⇒ Whenever
constructor
A new instance of Whenever.
Constructor Details
#initialize(&condition) ⇒ Whenever
Returns a new instance of Whenever.
6 7 8 9 |
# File 'lib/process_output_wrapper/whenever.rb', line 6 def initialize(&condition) @condition = condition @result = -> {} end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
3 4 5 |
# File 'lib/process_output_wrapper/whenever.rb', line 3 def condition @condition end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/process_output_wrapper/whenever.rb', line 3 def result @result end |
Instance Method Details
#do(&result) ⇒ Object
11 12 13 |
# File 'lib/process_output_wrapper/whenever.rb', line 11 def do(&result) @result = result end |