Class: DataMapper::Query::Direction
- Extended by:
- Deprecate
- Defined in:
- lib/dm-core/query/direction.rb
Instance Attribute Summary
Attributes inherited from Operator
Instance Method Summary collapse
-
#get(resource) ⇒ Object
private
TODO: document.
-
#reverse! ⇒ Object
private
TODO: document.
Methods included from Deprecate
Methods inherited from Operator
Methods included from Equalizer
Instance Method Details
#get(resource) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
TODO: document
30 31 32 |
# File 'lib/dm-core/query/direction.rb', line 30 def get(resource) Sort.new(target.get(resource), @operator == :asc) end |
#reverse! ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
TODO: document
23 24 25 26 |
# File 'lib/dm-core/query/direction.rb', line 23 def reverse! @operator = @operator == :asc ? :desc : :asc self end |