Class: DeepEnd::Node
- Inherits:
-
Object
- Object
- DeepEnd::Node
- Defined in:
- lib/deep_end.rb
Overview
Graph Node
Instance Attribute Summary collapse
-
#edges ⇒ Object
readonly
Returns the value of attribute edges.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#resolved_dependencies ⇒ Object
readonly
Returns the value of attribute resolved_dependencies.
-
#seen ⇒ Object
(also: #seen?)
Returns the value of attribute seen.
Instance Method Summary collapse
- #addEdge(node) ⇒ Object
-
#initialize(key) ⇒ Node
constructor
A new instance of Node.
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
#edges ⇒ Object (readonly)
Returns the value of attribute edges.
14 15 16 |
# File 'lib/deep_end.rb', line 14 def edges @edges end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
11 12 13 |
# File 'lib/deep_end.rb', line 11 def key @key end |
#resolved_dependencies ⇒ Object (readonly)
Returns the value of attribute resolved_dependencies.
15 16 17 |
# File 'lib/deep_end.rb', line 15 def resolved_dependencies @resolved_dependencies end |
#seen ⇒ Object 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 |