Class: Doodl::DirectedEdge

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

Instance Attribute Summary

Attributes inherited from Edge

#source, #target

Instance Method Summary collapse

Methods inherited from Edge

#initialize, #reflexive?, #to_s

Constructor Details

This class inherits a constructor from Doodl::Edge

Instance Method Details

#==(obj) ⇒ Object



24
25
26
27
28
29
# File 'lib/edge.rb', line 24

def ==(obj)
  obj.respond_to?(:source)  and
  obj.respond_to?(:target)  and
  obj.source == self.source and
  obj.target == self.target
end

#directed?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/edge.rb', line 31

def directed?
  true
end