Class: DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask::Results::Action
- Inherits:
-
DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask::Results
- Object
- DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask
- DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask::Results
- DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask::Results::Action
- Defined in:
- lib/task_status/stream_mode/element/hierarchical_task/result/action.rb
Instance Attribute Summary collapse
-
#action_results ⇒ Object
readonly
Returns the value of attribute action_results.
Instance Method Summary collapse
-
#initialize(element, hash) ⇒ Action
constructor
A new instance of Action.
- #render ⇒ Object
- #render_results(results_per_node) ⇒ Object
Methods inherited from DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask::Results
Methods inherited from DTK::Client::TaskStatus::StreamMode::Element::HierarchicalTask
Constructor Details
#initialize(element, hash) ⇒ Action
Returns a new instance of Action.
21 22 23 24 |
# File 'lib/task_status/stream_mode/element/hierarchical_task/result/action.rb', line 21 def initialize(element, hash) super @action_results = hash['action_results'] || [] end |
Instance Attribute Details
#action_results ⇒ Object (readonly)
Returns the value of attribute action_results.
26 27 28 |
# File 'lib/task_status/stream_mode/element/hierarchical_task/result/action.rb', line 26 def action_results @action_results end |
Instance Method Details
#render ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/task_status/stream_mode/element/hierarchical_task/result/action.rb', line 38 def render not_first_time = nil render_node_term @action_results.each do |action_result| render_action_result_lines(action_result, :first_time => not_first_time.nil?) not_first_time ||= true end render_empty_line end |
#render_results(results_per_node) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/task_status/stream_mode/element/hierarchical_task/result/action.rb', line 28 def render_results(results_per_node) if any_results?(results_per_node) render_line 'RESULTS:' render_empty_line results_per_node.each { |result| result.render } else render_errors(results_per_node) end end |