Class: PrettyAssociationInspect::Edge

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#costObject (readonly)

Returns the value of attribute cost.



10
11
12
# File 'lib/pretty_association_inspect.rb', line 10

def cost
  @cost
end

#node_idObject (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