Class: ManageIQ::Floe::Workflow::States::Wait
- Inherits:
-
ManageIQ::Floe::Workflow::State
- Object
- ManageIQ::Floe::Workflow::State
- ManageIQ::Floe::Workflow::States::Wait
- Defined in:
- lib/manageiq/floe/workflow/states/wait.rb
Instance Attribute Summary collapse
-
#end ⇒ Object
readonly
Returns the value of attribute end.
-
#input_path ⇒ Object
readonly
Returns the value of attribute input_path.
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#seconds ⇒ Object
readonly
Returns the value of attribute seconds.
Attributes inherited from ManageIQ::Floe::Workflow::State
#comment, #name, #payload, #type, #workflow
Instance Method Summary collapse
-
#initialize(workflow, name, payload) ⇒ Wait
constructor
A new instance of Wait.
- #run! ⇒ Object
Methods inherited from ManageIQ::Floe::Workflow::State
build!, #context, #end?, #to_dot, #to_dot_transitions
Methods included from Logging
Constructor Details
#initialize(workflow, name, payload) ⇒ Wait
Returns a new instance of Wait.
10 11 12 13 14 15 16 17 18 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 10 def initialize(workflow, name, payload) super @next = payload["Next"] @seconds = payload["Seconds"].to_i @input_path = Path.new(payload.fetch("InputPath", "$"), context) @output_path = Path.new(payload.fetch("OutputPath", "$"), context) end |
Instance Attribute Details
#end ⇒ Object (readonly)
Returns the value of attribute end.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 8 def end @end end |
#input_path ⇒ Object (readonly)
Returns the value of attribute input_path.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 8 def input_path @input_path end |
#next ⇒ Object (readonly)
Returns the value of attribute next.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 8 def next @next end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 8 def output_path @output_path end |
#seconds ⇒ Object (readonly)
Returns the value of attribute seconds.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 8 def seconds @seconds end |
Instance Method Details
#run! ⇒ Object
20 21 22 |
# File 'lib/manageiq/floe/workflow/states/wait.rb', line 20 def run!(*) super { sleep(seconds); nil } end |