Class: Dsl::Graph::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/dsl/graph/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, label) ⇒ Node

Returns a new instance of Node.



8
9
10
11
# File 'lib/dsl/graph/node.rb', line 8

def initialize(id, label)
  @id = id
  @label = label
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/dsl/graph/node.rb', line 5

def id
  @id
end

#labelObject

Returns the value of attribute label.



6
7
8
# File 'lib/dsl/graph/node.rb', line 6

def label
  @label
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/dsl/graph/node.rb', line 13

def to_s
  @label
end