Class: Hydrangea::Graph
- Inherits:
-
Object
- Object
- Hydrangea::Graph
- Extended by:
- Forwardable
- Defined in:
- lib/hydrangea/graph.rb
Instance Method Summary collapse
-
#initialize(nodes) ⇒ Graph
constructor
A new instance of Graph.
Constructor Details
#initialize(nodes) ⇒ Graph
Returns a new instance of Graph.
10 11 12 13 14 15 16 |
# File 'lib/hydrangea/graph.rb', line 10 def initialize(nodes) @nodes = case nodes when Set then nodes.to_a when Array then nodes.dup else nodes.each.to_a end end |