Class: Dynflow::Flows::Atom

Inherits:
Abstract show all
Defined in:
lib/dynflow/flows/atom.rb

Constant Summary

Constants inherited from Serializable

Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

decode, #empty?, #includes_step?, #to_hash

Methods inherited from Serializable

constantize, from_hash, #to_hash

Constructor Details

#initialize(step_id) ⇒ Atom

Returns a new instance of Atom.



12
13
14
# File 'lib/dynflow/flows/atom.rb', line 12

def initialize(step_id)
  @step_id = Type! step_id, Integer
end

Instance Attribute Details

#step_idObject (readonly)

Returns the value of attribute step_id.



6
7
8
# File 'lib/dynflow/flows/atom.rb', line 6

def step_id
  @step_id
end

Instance Method Details

#all_step_idsObject



20
21
22
# File 'lib/dynflow/flows/atom.rb', line 20

def all_step_ids
  [step_id]
end

#encodeObject



8
9
10
# File 'lib/dynflow/flows/atom.rb', line 8

def encode
  step_id
end

#flatten!Object



24
25
26
# File 'lib/dynflow/flows/atom.rb', line 24

def flatten!
  # nothing to do
end

#sizeObject



16
17
18
# File 'lib/dynflow/flows/atom.rb', line 16

def size
  1
end