Class: DeepEnd::Node

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

Overview

Graph Node

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ Node

Returns a new instance of Node.



17
18
19
20
# File 'lib/deep_end.rb', line 17

def initialize(key)
  @key = key
  @edges = []
end

Instance Attribute Details

#edgesObject (readonly)

Returns the value of attribute edges.



14
15
16
# File 'lib/deep_end.rb', line 14

def edges
  @edges
end

#keyObject (readonly)

Returns the value of attribute key.



11
12
13
# File 'lib/deep_end.rb', line 11

def key
  @key
end

#resolved_dependenciesObject (readonly)

Returns the value of attribute resolved_dependencies.



15
16
17
# File 'lib/deep_end.rb', line 15

def resolved_dependencies
  @resolved_dependencies
end

#seenObject Also known as: seen?

Returns the value of attribute seen.



12
13
14
# File 'lib/deep_end.rb', line 12

def seen
  @seen
end

Instance Method Details

#addEdge(node) ⇒ Object



22
23
24
# File 'lib/deep_end.rb', line 22

def addEdge(node)
  @edges << node
end