Class: Pod::Target::Commands::Graph::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/pod/target/commands/resolve/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/pod/target/commands/resolve/graph.rb', line 8

def name
  @name
end

#neighborsObject

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