Class: Solidarity::Graph::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Node



50
51
52
53
54
# File 'lib/solidarity/graph.rb', line 50

def initialize(data)
  @name = data[:name]
  @label = data[:label]
  @type = data[:type]
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



48
49
50
# File 'lib/solidarity/graph.rb', line 48

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



48
49
50
# File 'lib/solidarity/graph.rb', line 48

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



48
49
50
# File 'lib/solidarity/graph.rb', line 48

def type
  @type
end