Class: Struct::Edge
- Inherits:
-
Object
- Object
- Struct::Edge
- Defined in:
- lib/port_upgrade.rb
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/port_upgrade.rb', line 39 def <=>(other) portdif = self.port <=> other.port depdif = self.dep <=> other.dep if self.port == other.port and self.dep == other.dep and self.level == other.level return 0 elsif portdif != 0 return portdif elsif depdif != 0 return depdif else return self.level <=> other.level end end |