class Dynflow::ExecutionHistory
Constants
- Event
Attributes
events[R]
Public Class Methods
new(events = [])
click to toggle source
# File lib/dynflow/execution_history.rb, line 22 def initialize(events = []) @events = (events || []).each { |e| Type! e, Event } end
new_from_hash(value)
click to toggle source
# File lib/dynflow/execution_history.rb, line 42 def self.new_from_hash(value) value ||= [] # for compatibility with tasks before the # introduction of execution history self.new(value.map { |hash| Event[hash] }) end
Public Instance Methods
add(name, world_id = nil)
click to toggle source
# File lib/dynflow/execution_history.rb, line 30 def add(name, world_id = nil) @events << Event[Time.now.to_i, name, world_id] end
each(&block)
click to toggle source
# File lib/dynflow/execution_history.rb, line 26 def each(&block) @events.each(&block) end
inspect()
click to toggle source
# File lib/dynflow/execution_history.rb, line 38 def inspect "ExecutionHistory: #{@events.inspect}" end
to_hash()
click to toggle source
# File lib/dynflow/execution_history.rb, line 34 def to_hash @events.map(&:to_hash) end