Class: Solidarity::Graph::Node
- Inherits:
-
Object
- Object
- Solidarity::Graph::Node
- Defined in:
- lib/solidarity/graph.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Node
constructor
A new instance of Node.
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
#label ⇒ Object (readonly)
Returns the value of attribute label.
48 49 50 |
# File 'lib/solidarity/graph.rb', line 48 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
48 49 50 |
# File 'lib/solidarity/graph.rb', line 48 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
48 49 50 |
# File 'lib/solidarity/graph.rb', line 48 def type @type end |