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.
26 27 28 29 30 31 |
# File 'lib/hookit/resource/execute.rb', line 26 def initialize(name) command name unless command timeout 3600 returns 0 super end |
Instance Method Details
#run(action) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/hookit/resource/execute.rb', line 33 def run(action) case action when :run if stream stream! else run! end end end |