Sha256: 3cc69b297232aa6d327ea7d4574bb8cf2d42606f337a45b5c2b868157bb877d3
Contents?: true
Size: 805 Bytes
Versions: 11
Compression:
Stored size: 805 Bytes
Contents
# TODO: rename this DM::Symbol::Direction # TODO: add a method to convert it into a DM::Query::Sort object, eg: # operator.sort_for(model) # TODO: rename #target to #property_name # TODO: make sure Query converts this into a DM::Query::Sort object # immediately and passes that down to the Adapter # TODO: remove #get method module DataMapper class Query class Direction < Operator # @api private def reverse! @operator = @operator == :asc ? :desc : :asc self end # @api private def get(resource) Sort.new(target.get(resource), @operator == :asc) end private # @api private def initialize(target, operator = :asc) super end end # class Direction end # class Query end # module DataMapper
Version data entries
11 entries across 11 versions & 3 rubygems