Module: Kantox::Split::Graph::Edge::InstanceMethods

Defined in:
lib/kantox/split/graph.rb

Instance Method Summary collapse

Instance Method Details

#vertex_getterObject



102
103
104
105
106
107
108
109
110
# File 'lib/kantox/split/graph.rb', line 102

def vertex_getter
  return nil unless respond_to? :vertex
  v = (vtx = vertex).is_a?(Hash) ? vtx[:method] || vtx[:lambda] : vtx
  lambda do |vertex|
    unless [:todos].include? v # FIXME UGLY HACK
      [ vtx, Utils.lookup_variable_value(vertex, v) ]
    end
  end
end