Class: Dynflow::Flows::Atom

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

#empty?, #includes_step?

Methods inherited from Serializable

constantize, from_hash

Constructor Details

#initialize(step_id) ⇒ Atom

Returns a new instance of Atom.



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

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

Instance Attribute Details

#step_idObject (readonly)

Returns the value of attribute step_id.



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

def step_id
  @step_id
end

Instance Method Details

#all_step_idsObject



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

def all_step_ids
  [step_id]
end

#flatten!Object



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

def flatten!
  # nothing to do
end

#sizeObject



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

def size
  1
end

#to_hashObject



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

def to_hash
  super.merge(:step_id => step_id)
end