Class: ActiveMocker::Queries::Sort::DESC
- Inherits:
-
Object
- Object
- ActiveMocker::Queries::Sort::DESC
- Defined in:
- lib/active_mocker/mock/queries.rb
Instance Attribute Summary collapse
-
#r ⇒ Object
readonly
Returns the value of attribute r.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(r) ⇒ DESC
constructor
A new instance of DESC.
Constructor Details
#initialize(r) ⇒ DESC
Returns a new instance of DESC.
331 332 333 |
# File 'lib/active_mocker/mock/queries.rb', line 331 def initialize(r) @r = r end |
Instance Attribute Details
#r ⇒ Object (readonly)
Returns the value of attribute r.
329 330 331 |
# File 'lib/active_mocker/mock/queries.rb', line 329 def r @r end |
Instance Method Details
#<=>(other) ⇒ Object
335 336 337 |
# File 'lib/active_mocker/mock/queries.rb', line 335 def <=>(other) -(r <=> other.r) # Flip negative/positive result end |