Class: Sankey::ProcessVertex

Inherits:
Vertex
  • Object
show all
Defined in:
lib/processvertex.rb

Instance Attribute Summary

Attributes inherited from Vertex

#points

Instance Method Summary collapse

Constructor Details

#initialize(a, b, c, d) ⇒ ProcessVertex

Returns a new instance of ProcessVertex.



5
6
7
8
# File 'lib/processvertex.rb', line 5

def initialize(a, b, c, d)
  super()
  [a, b, c, d].each { |x| @points.push x }
end

Instance Method Details

#input_edgeObject



10
11
12
# File 'lib/processvertex.rb', line 10

def input_edge
  {:bottom => @points[1], :top => @points[0]}
end

#output_edgeObject



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

def output_edge
  {:bottom => @points[2], :top => @points[3]}
end