Class: Julewire::Core::Execution::View
- Inherits:
-
Object
- Object
- Julewire::Core::Execution::View
- Defined in:
- lib/julewire/core/execution/view.rb
Overview
Read-only view returned by Julewire.current_execution.
Instance Attribute Summary collapse
- #finished_at ⇒ Object readonly
- #id ⇒ Object readonly
- #lineage ⇒ Object readonly
- #started_at ⇒ Object readonly
- #type ⇒ Object readonly
Instance Method Summary collapse
- #attributes_hash ⇒ Object
- #carry_hash ⇒ Object
- #context_hash ⇒ Object
- #execution_hash ⇒ Object
- #finished? ⇒ Boolean
-
#initialize(scope) ⇒ View
constructor
A new instance of View.
- #labels_hash ⇒ Object
- #metrics_hash ⇒ Object
- #neutral_hash ⇒ Object
- #parent ⇒ Object
- #summary_hash ⇒ Object
Constructor Details
#initialize(scope) ⇒ View
Returns a new instance of View.
11 12 13 14 15 16 17 18 19 |
# File 'lib/julewire/core/execution/view.rb', line 11 def initialize(scope) @scope = scope @id = scope.id @type = scope.type @started_at = scope.started_at @finished_at = scope.finished_at @parent_scope = scope.parent @lineage = scope.lineage end |
Instance Attribute Details
#finished_at ⇒ Object (readonly)
9 10 11 |
# File 'lib/julewire/core/execution/view.rb', line 9 def finished_at @finished_at end |
#id ⇒ Object (readonly)
9 10 11 |
# File 'lib/julewire/core/execution/view.rb', line 9 def id @id end |
#lineage ⇒ Object (readonly)
9 10 11 |
# File 'lib/julewire/core/execution/view.rb', line 9 def lineage @lineage end |
#started_at ⇒ Object (readonly)
9 10 11 |
# File 'lib/julewire/core/execution/view.rb', line 9 def started_at @started_at end |
#type ⇒ Object (readonly)
9 10 11 |
# File 'lib/julewire/core/execution/view.rb', line 9 def type @type end |
Instance Method Details
#attributes_hash ⇒ Object
35 |
# File 'lib/julewire/core/execution/view.rb', line 35 def attributes_hash = Fields::FieldSet.deep_dup_owned(@attributes_hash ||= @scope.attributes_hash) |
#carry_hash ⇒ Object
31 |
# File 'lib/julewire/core/execution/view.rb', line 31 def carry_hash = Fields::FieldSet.deep_dup_owned(@carry_hash ||= @scope.carry_hash) |
#context_hash ⇒ Object
29 |
# File 'lib/julewire/core/execution/view.rb', line 29 def context_hash = Fields::FieldSet.deep_dup_owned(@context_hash ||= @scope.context_hash) |
#execution_hash ⇒ Object
27 |
# File 'lib/julewire/core/execution/view.rb', line 27 def execution_hash = Fields::FieldSet.deep_dup_owned(@execution_hash ||= @scope.frozen_execution_hash) |
#finished? ⇒ Boolean
43 |
# File 'lib/julewire/core/execution/view.rb', line 43 def finished? = !finished_at.nil? |
#labels_hash ⇒ Object
37 |
# File 'lib/julewire/core/execution/view.rb', line 37 def labels_hash = Fields::FieldSet.deep_dup_owned(@labels_hash ||= @scope.frozen_labels_hash) |
#metrics_hash ⇒ Object
41 |
# File 'lib/julewire/core/execution/view.rb', line 41 def metrics_hash = Fields::FieldSet.deep_dup_owned(@metrics_hash ||= @scope.metrics_hash) |
#neutral_hash ⇒ Object
33 |
# File 'lib/julewire/core/execution/view.rb', line 33 def neutral_hash = Fields::FieldSet.deep_dup_owned(@neutral_hash ||= @scope.neutral_hash) |
#parent ⇒ Object
21 22 23 24 25 |
# File 'lib/julewire/core/execution/view.rb', line 21 def parent return unless @parent_scope @parent ||= self.class.new(@parent_scope) end |
#summary_hash ⇒ Object
39 |
# File 'lib/julewire/core/execution/view.rb', line 39 def summary_hash = Fields::FieldSet.deep_dup_owned(@summary_hash ||= @scope.summary_hash) |