Class: Hookit::Resource::Execute
- Defined in:
- lib/hookit/resource/execute.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name) ⇒ Execute
constructor
A new instance of Execute.
- #run(action) ⇒ Object
Methods inherited from Base
#action, actions, #can_run?, default_action, #default_action, field, #not_if, #only_if
Constructor Details
#initialize(name) ⇒ Execute
Returns a new instance of Execute.
22 23 24 25 26 27 |
# File 'lib/hookit/resource/execute.rb', line 22 def initialize(name) command name unless command timeout 3600 returns 0 super end |
Instance Method Details
#run(action) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/hookit/resource/execute.rb', line 29 def run(action) case action when :run if stream stream! else run! end end end |