class DataMapper::Query::Direction

Public Class Methods

new(target, operator = :asc) click to toggle source

@api private

Calls superclass method
# File lib/dm-core/query/direction.rb, line 31
def initialize(target, operator = :asc)
  super
end

Public Instance Methods

get(resource) click to toggle source

@api private

# File lib/dm-core/query/direction.rb, line 24
def get(resource)
  Sort.new(target.get(resource), @operator == :asc)
end
reverse!() click to toggle source

@api private

# File lib/dm-core/query/direction.rb, line 18
def reverse!
  @operator = @operator == :asc ? :desc : :asc
  self
end