Class: Dynflow::ExecutionPlan::InvalidPlan
- Inherits:
-
Object
- Object
- Dynflow::ExecutionPlan::InvalidPlan
- Defined in:
- lib/dynflow/execution_plan.rb
Overview
a fallback object representing a plan with some corrupted data, preventing to load the whole plan properly, this can be used for presenting at least some data and not running into internal server errors
Instance Attribute Summary collapse
-
#ended_at ⇒ Object
readonly
Returns the value of attribute ended_at.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#execution_history ⇒ Object
readonly
Returns the value of attribute execution_history.
-
#execution_time ⇒ Object
readonly
Returns the value of attribute execution_time.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#real_time ⇒ Object
readonly
Returns the value of attribute real_time.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(exception, id, label, state, started_at = nil, ended_at = nil, execution_time = nil, real_time = nil, execution_history = nil) ⇒ InvalidPlan
constructor
A new instance of InvalidPlan.
- #result ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(exception, id, label, state, started_at = nil, ended_at = nil, execution_time = nil, real_time = nil, execution_history = nil) ⇒ InvalidPlan
Returns a new instance of InvalidPlan.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dynflow/execution_plan.rb', line 17 def initialize(exception, id, label, state, started_at = nil, ended_at = nil, execution_time = nil, real_time = nil, execution_history = nil) @exception = exception @id = id @label = label || 'N/A' @state = state @started_at = started_at @ended_at = ended_at @execution_time = execution_time @real_time = real_time @execution_history = execution_history || [] end |
Instance Attribute Details
#ended_at ⇒ Object (readonly)
Returns the value of attribute ended_at.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def ended_at @ended_at end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def exception @exception end |
#execution_history ⇒ Object (readonly)
Returns the value of attribute execution_history.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def execution_history @execution_history end |
#execution_time ⇒ Object (readonly)
Returns the value of attribute execution_time.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def execution_time @execution_time end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def label @label end |
#real_time ⇒ Object (readonly)
Returns the value of attribute real_time.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def real_time @real_time end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def started_at @started_at end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
13 14 15 |
# File 'lib/dynflow/execution_plan.rb', line 13 def state @state end |
Instance Method Details
#result ⇒ Object
35 36 37 |
# File 'lib/dynflow/execution_plan.rb', line 35 def result 'N/A' end |
#valid? ⇒ Boolean
31 32 33 |
# File 'lib/dynflow/execution_plan.rb', line 31 def valid? false end |