Class: DTK::Client::TaskStatus::StreamMode::Element

Inherits:
Object
  • Object
show all
Includes:
RenderMixin
Defined in:
lib/task_status/stream_mode/element/format.rb,
lib/task_status/stream_mode/element.rb,
lib/task_status/stream_mode/element/stage.rb,
lib/task_status/stream_mode/element/render.rb,
lib/task_status/stream_mode/element/task_end.rb,
lib/task_status/stream_mode/element/no_results.rb,
lib/task_status/stream_mode/element/task_start.rb,
lib/task_status/stream_mode/element/hierarchical_task.rb,
lib/task_status/stream_mode/element/hierarchical_task/steps.rb,
lib/task_status/stream_mode/element/hierarchical_task/result.rb

Overview

Copyright © 2010-2016 dtk contributors

This file is part of the dtk project.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Direct Known Subclasses

NoResults, Stage, TaskEnd, TaskStart

Defined Under Namespace

Modules: RenderMixin Classes: Format, HierarchicalTask, NoResults, Stage, TaskEnd, TaskStart

Class Method Summary collapse

Instance Method Summary collapse

Methods included from RenderMixin

#formatted_duration?, #render_border, #render_duration_line, #render_empty_line, #render_empty_lines, #render_line, #render_start_time

Constructor Details

#initialize(response_element, opts = {}) ⇒ Element

Returns a new instance of Element.



29
30
31
32
33
# File 'lib/task_status/stream_mode/element.rb', line 29

def initialize(response_element, opts = {})
  @response_element    = response_element
  @formatter          = Format.new(response_element['type'])
  @ignore_stage_level_info = opts[:ignore_stage_level_info]
end

Class Method Details

.get_and_render_stages(task_status_handle, opts = {}) ⇒ Object



39
40
41
# File 'lib/task_status/stream_mode/element.rb', line 39

def self.get_and_render_stages(task_status_handle, opts = {})
  Stage.get_and_render_stages(task_status_handle, opts)
end

.get_and_render_task_start(task_status_handle, opts = {}) ⇒ Object



35
36
37
# File 'lib/task_status/stream_mode/element.rb', line 35

def self.get_and_render_task_start(task_status_handle, opts = {})
  render_elements(TaskStart.get(task_status_handle, opts))
end