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 20 21 22 23 24 25 26 27 28 |
# 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 @parent = nil @execution_hash = nil @context_hash = nil @carry_hash = nil @neutral_hash = nil @attributes_hash = nil @labels_hash = nil @summary_hash = nil @metrics_hash = nil 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
44 |
# File 'lib/julewire/core/execution/view.rb', line 44 def attributes_hash = Fields::FieldSet.deep_dup(@attributes_hash ||= @scope.attributes_hash) |
#carry_hash ⇒ Object
40 |
# File 'lib/julewire/core/execution/view.rb', line 40 def carry_hash = Fields::FieldSet.deep_dup(@carry_hash ||= @scope.carry_hash) |
#context_hash ⇒ Object
38 |
# File 'lib/julewire/core/execution/view.rb', line 38 def context_hash = Fields::FieldSet.deep_dup(@context_hash ||= @scope.context_hash) |
#execution_hash ⇒ Object
36 |
# File 'lib/julewire/core/execution/view.rb', line 36 def execution_hash = Fields::FieldSet.deep_dup(@execution_hash ||= @scope.frozen_execution_hash) |
#finished? ⇒ Boolean
52 |
# File 'lib/julewire/core/execution/view.rb', line 52 def finished? = !finished_at.nil? |
#labels_hash ⇒ Object
46 |
# File 'lib/julewire/core/execution/view.rb', line 46 def labels_hash = Fields::FieldSet.deep_dup(@labels_hash ||= @scope.frozen_labels_hash) |
#metrics_hash ⇒ Object
50 |
# File 'lib/julewire/core/execution/view.rb', line 50 def metrics_hash = Fields::FieldSet.deep_dup(@metrics_hash ||= @scope.metrics_hash) |
#neutral_hash ⇒ Object
42 |
# File 'lib/julewire/core/execution/view.rb', line 42 def neutral_hash = Fields::FieldSet.deep_dup(@neutral_hash ||= @scope.neutral_hash) |
#parent ⇒ Object
30 31 32 33 34 |
# File 'lib/julewire/core/execution/view.rb', line 30 def parent return unless @parent_scope @parent ||= self.class.new(@parent_scope) end |