Class: PrettyAssociationInspect::Edge
- Inherits:
-
Object
- Object
- PrettyAssociationInspect::Edge
- Defined in:
- lib/pretty_association_inspect.rb
Instance Attribute Summary collapse
-
#cost ⇒ Object
readonly
Returns the value of attribute cost.
-
#node_id ⇒ Object
readonly
Returns the value of attribute node_id.
Instance Method Summary collapse
-
#initialize(cost, node_id) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(cost, node_id) ⇒ Edge
Returns a new instance of Edge.
7 8 9 |
# File 'lib/pretty_association_inspect.rb', line 7 def initialize(cost, node_id) @cost, @node_id = cost, node_id end |
Instance Attribute Details
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
10 11 12 |
# File 'lib/pretty_association_inspect.rb', line 10 def cost @cost end |
#node_id ⇒ Object (readonly)
Returns the value of attribute node_id.
10 11 12 |
# File 'lib/pretty_association_inspect.rb', line 10 def node_id @node_id end |