Class: PrettyAssociationInspect::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#costObject

Returns the value of attribute cost.



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

def cost
  @cost
end

#doneObject

Returns the value of attribute done.



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

def done
  @done
end

#edgesObject

Returns the value of attribute edges.



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

def edges
  @edges
end

#fromObject

Returns the value of attribute from.



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

def from
  @from
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end