def slice!(*args)
      offset, limit = extract_slice_arguments(*args)

      if self.limit || self.offset > 0
        offset, limit = get_relative_position(offset, limit)
      end

      update(:offset => offset, :limit => limit)
    end
def slice!(*args)
      offset, limit = extract_slice_arguments(*args)

      if self.limit || self.offset > 0
        offset, limit = get_relative_position(offset, limit)
      end

      update(:offset => offset, :limit => limit)
    end
Slices collection by adding limit and offset to the
 query, so a single query is executed

 @example

   Journal.all(:limit => 10).slice!(3, 5)

 will execute query with the following limit
 (when repository uses DataObjects adapter, and thus
 queries use SQL):

   LIMIT 10

 and then takes a slice of collection in the Ruby space

 @api semipublic