lib/parelation/criteria/offset.rb in parelation-0.1.0 vs lib/parelation/criteria/offset.rb in parelation-0.2.0

- old
+ new

@@ -1,23 +1,19 @@ class Parelation::Criteria::Offset < Parelation::Criteria + # @return [Regexp] the offset format. + # + OFFSET_FORMAT = /^offset$/ + # @param param [String] # @return [TrueClass, FalseClass] # def self.match?(param) - !!(param =~ /^offset$/) + !!param.match(OFFSET_FORMAT) end # @return [ActiveRecord::Relation] # def call - chain.offset(offset) - end - - private - - # Alias for {#value}. - # - def offset - value + chain.offset(value) end end