Class: Pod::Target::Commands::Graph::Node
- Inherits:
-
Object
- Object
- Pod::Target::Commands::Graph::Node
- Defined in:
- lib/pod/target/commands/resolve/graph.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#neighbors ⇒ Object
Returns the value of attribute neighbors.
Instance Method Summary collapse
- #add_neighbor(node) ⇒ Object
-
#initialize(name) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(name) ⇒ Node
Returns a new instance of Node.
11 12 13 14 |
# File 'lib/pod/target/commands/resolve/graph.rb', line 11 def initialize(name) self.name = name self.neighbors = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/pod/target/commands/resolve/graph.rb', line 8 def name @name end |
#neighbors ⇒ Object
Returns the value of attribute neighbors.
9 10 11 |
# File 'lib/pod/target/commands/resolve/graph.rb', line 9 def neighbors @neighbors end |
Instance Method Details
#add_neighbor(node) ⇒ Object
16 17 18 |
# File 'lib/pod/target/commands/resolve/graph.rb', line 16 def add_neighbor(node) neighbors << node end |