Class: DTAS::TFX::TFXSort
- Inherits:
-
Struct
- Object
- Struct
- DTAS::TFX::TFXSort
- Defined in:
- lib/dtas/tfx.rb
Overview
for stable sorting
Instance Attribute Summary collapse
-
#idx ⇒ Object
Returns the value of attribute idx.
-
#tfx ⇒ Object
Returns the value of attribute tfx.
Instance Method Summary collapse
Instance Attribute Details
#idx ⇒ Object
Returns the value of attribute idx
89 90 91 |
# File 'lib/dtas/tfx.rb', line 89 def idx @idx end |
#tfx ⇒ Object
Returns the value of attribute tfx
89 90 91 |
# File 'lib/dtas/tfx.rb', line 89 def tfx @tfx end |
Instance Method Details
#<=>(other) ⇒ Object
90 91 92 93 |
# File 'lib/dtas/tfx.rb', line 90 def <=>(other) cmp = tfx <=> other.tfx 0 == cmp ? idx <=> other.idx : cmp end |