Class: Dynflow::Flows::Abstract

Inherits:
Serializable show all
Includes:
Algebrick::TypeCheck
Defined in:
lib/dynflow/flows/abstract.rb

Direct Known Subclasses

AbstractComposed, Atom

Instance Method Summary collapse

Methods inherited from Serializable

constantize, from_hash, new_from_hash

Constructor Details

#initializeAbstract

Returns a new instance of Abstract.



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

def initialize
  raise 'cannot instantiate Flows::Abstract'
end

Instance Method Details

#all_step_idsObject

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/dynflow/flows/abstract.rb', line 27

def all_step_ids
  raise NotImplementedError
end

#empty?Boolean

Returns:

  • (Boolean)


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

def empty?
  self.size == 0
end

#flatten!Object

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/dynflow/flows/abstract.rb', line 31

def flatten!
  raise NotImplementedError
end

#includes_step?(step_id) ⇒ Boolean

Returns:

  • (Boolean)


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

def includes_step?(step_id)
  self.all_step_ids.any? { |s| s == step_id }
end

#sizeObject

Raises:

  • (NotImplementedError)


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

def size
  raise NotImplementedError
end

#to_hashObject



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

def to_hash
  { :class => self.class.name }
end