Class: PrettyAssociationInspect::Node
- Inherits:
-
Object
- Object
- PrettyAssociationInspect::Node
- Defined in:
- lib/pretty_association_inspect.rb
Instance Attribute Summary collapse
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#done ⇒ Object
Returns the value of attribute done.
-
#edges ⇒ Object
Returns the value of attribute edges.
-
#from ⇒ Object
Returns the value of attribute from.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id, edges, cost = nil, done = false, from = nil) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(id, edges, cost = nil, done = false, from = nil) ⇒ Node
Returns a new instance of Node.
14 15 16 |
# File 'lib/pretty_association_inspect.rb', line 14 def initialize(id, edges, cost=nil, done=false, from=nil) @id, @edges, @cost, @done, @from = id, edges, cost, done, from end |
Instance Attribute Details
#cost ⇒ Object
Returns the value of attribute cost.
17 18 19 |
# File 'lib/pretty_association_inspect.rb', line 17 def cost @cost end |
#done ⇒ Object
Returns the value of attribute done.
17 18 19 |
# File 'lib/pretty_association_inspect.rb', line 17 def done @done end |
#edges ⇒ Object
Returns the value of attribute edges.
17 18 19 |
# File 'lib/pretty_association_inspect.rb', line 17 def edges @edges end |
#from ⇒ Object
Returns the value of attribute from.
17 18 19 |
# File 'lib/pretty_association_inspect.rb', line 17 def from @from end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/pretty_association_inspect.rb', line 17 def id @id end |