Class: GV::Node
Overview
Represents a node in the graph
Instance Attribute Summary
Attributes inherited from Component
Instance Method Summary collapse
-
#initialize(graph, name_or_ptr) ⇒ Node
constructor
A new instance of Node.
Methods inherited from Component
#==, #[], #[]=, #hash, #html, #name
Constructor Details
#initialize(graph, name_or_ptr) ⇒ Node
Returns a new instance of Node.
121 122 123 124 125 126 127 128 129 130 |
# File 'lib/gv.rb', line 121 def initialize(graph, name_or_ptr) @graph = graph @ptr = case name_or_ptr when String Libcgraph.agnode(graph.ptr, name_or_ptr, 1) else name_or_ptr end end |