Class: DTAS::TrimFX::TFXSort
- Inherits:
-
Struct
- Object
- Struct
- DTAS::TrimFX::TFXSort
- Defined in:
- lib/dtas/trimfx.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
83 84 85 |
# File 'lib/dtas/trimfx.rb', line 83 def idx @idx end |
#tfx ⇒ Object
Returns the value of attribute tfx
83 84 85 |
# File 'lib/dtas/trimfx.rb', line 83 def tfx @tfx end |
Instance Method Details
#<=>(other) ⇒ Object
84 85 86 87 |
# File 'lib/dtas/trimfx.rb', line 84 def <=>(other) cmp = tfx <=> other.tfx 0 == cmp ? idx <=> other.idx : cmp end |