Module: Hanuman::StageInstanceMethods

Included in:
Stage, StageBuilder
Defined in:
lib/hanuman/stage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#graphObject

Returns the value of attribute graph.



5
6
7
# File 'lib/hanuman/stage.rb', line 5

def graph
  @graph
end

Instance Method Details



9
10
11
12
# File 'lib/hanuman/stage.rb', line 9

def add_link(type, other_stage)
  self.links << Hanuman::LinkFactory.connect(type, linkable_name(:in), other_stage.linkable_name(:out))
  graph.add_link(type, self, other_stage) if graph
end

#linkable_name(direction) ⇒ Object



7
# File 'lib/hanuman/stage.rb', line 7

def linkable_name(direction) ; self.label ; end

#rootObject



14
15
16
# File 'lib/hanuman/stage.rb', line 14

def root
  graph ? graph.root(self) : self
end