class Dynflow::ExecutionHistory
Constants
- Event
Attributes
events[R]
Public Class Methods
new(events = [])
click to toggle source
# File lib/dynflow/execution_history.rb, line 21 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 41 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 29 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 25 def each(&block) @events.each(&block) end
inspect()
click to toggle source
# File lib/dynflow/execution_history.rb, line 37 def inspect "ExecutionHistory: #{ @events.inspect }" end
to_hash()
click to toggle source
# File lib/dynflow/execution_history.rb, line 33 def to_hash @events.map(&:to_hash) end