Class: Julewire::Core::Execution::View

Inherits:
Object
  • Object
show all
Defined in:
lib/julewire/core/execution/view.rb

Overview

Read-only view returned by Julewire.current_execution.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (readonly)



9
10
11
# File 'lib/julewire/core/execution/view.rb', line 9

def finished_at
  @finished_at
end

#idObject (readonly)



9
10
11
# File 'lib/julewire/core/execution/view.rb', line 9

def id
  @id
end

#lineageObject (readonly)



9
10
11
# File 'lib/julewire/core/execution/view.rb', line 9

def lineage
  @lineage
end

#started_atObject (readonly)



9
10
11
# File 'lib/julewire/core/execution/view.rb', line 9

def started_at
  @started_at
end

#typeObject (readonly)



9
10
11
# File 'lib/julewire/core/execution/view.rb', line 9

def type
  @type
end

Instance Method Details

#attributes_hashObject



35
# File 'lib/julewire/core/execution/view.rb', line 35

def attributes_hash = Fields::FieldSet.deep_dup_owned(@attributes_hash ||= @scope.attributes_hash)

#carry_hashObject



31
# File 'lib/julewire/core/execution/view.rb', line 31

def carry_hash = Fields::FieldSet.deep_dup_owned(@carry_hash ||= @scope.carry_hash)

#context_hashObject



29
# File 'lib/julewire/core/execution/view.rb', line 29

def context_hash = Fields::FieldSet.deep_dup_owned(@context_hash ||= @scope.context_hash)

#execution_hashObject



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

Returns:

  • (Boolean)


43
# File 'lib/julewire/core/execution/view.rb', line 43

def finished? = !finished_at.nil?

#labels_hashObject



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_hashObject



41
# File 'lib/julewire/core/execution/view.rb', line 41

def metrics_hash = Fields::FieldSet.deep_dup_owned(@metrics_hash ||= @scope.metrics_hash)

#neutral_hashObject



33
# File 'lib/julewire/core/execution/view.rb', line 33

def neutral_hash = Fields::FieldSet.deep_dup_owned(@neutral_hash ||= @scope.neutral_hash)

#parentObject



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_hashObject



39
# File 'lib/julewire/core/execution/view.rb', line 39

def summary_hash = Fields::FieldSet.deep_dup_owned(@summary_hash ||= @scope.summary_hash)