Class: GraphLink

Inherits:
Struct
  • Object
show all
Defined in:
lib/graphr/directed_graph.rb,
lib/graphr/directed_graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject

Returns the value of attribute from

Returns:

  • (Object)

    the current value of from



13
14
15
# File 'lib/graphr/directed_graph.rb', line 13

def from
  @from
end

#infoObject

Returns the value of attribute info

Returns:

  • (Object)

    the current value of info



13
14
15
# File 'lib/graphr/directed_graph.rb', line 13

def info
  @info
end

#toObject

Returns the value of attribute to

Returns:

  • (Object)

    the current value of to



13
14
15
# File 'lib/graphr/directed_graph.rb', line 13

def to
  @to
end

Instance Method Details

#inspectObject



15
16
17
18
# File 'lib/graphr/directed_graph.rb', line 15

def inspect
  info_str = info ? info.inspect + "-" : ""
  "#{from.inspect}-#{info_str}>#{to.inspect}"
end