lib/jsonapi/paginator.rb in jsonapi-resources-0.2.0 vs lib/jsonapi/paginator.rb in jsonapi-resources-0.3.0.pre1
- old
+ new
@@ -2,28 +2,17 @@
class Paginator
def initialize(params)
end
def apply(relation)
- # :nocov:
- relation
- # :nocov:
+ # relation
end
class << self
- # :nocov:
- if RUBY_VERSION >= '2.0'
- def paginator_for(paginator)
- paginator_class_name = "#{paginator.to_s.camelize}Paginator"
- Object.const_get(paginator_class_name) if paginator_class_name
- end
- else
- def paginator_for(paginator)
- paginator_class_name = "#{paginator.to_s.camelize}Paginator"
- paginator_class_name.safe_constantize if paginator_class_name
- end
+ def paginator_for(paginator)
+ paginator_class_name = "#{paginator.to_s.camelize}Paginator"
+ paginator_class_name.safe_constantize if paginator_class_name
end
- # :nocov:
end
end
end
class OffsetPaginator < JSONAPI::Paginator