Sha256: a1dc26f5231dc1ec8c6dec86445e1232b3c742e7fbc2d2b8fe05ab152cede62e
Contents?: true
Size: 608 Bytes
Versions: 1
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true require_relative './base_processor' require_relative './paginate/enumerable_adapter' require_relative './paginate/active_record_adapter' class ActiveSet class PaginateProcessor < BaseProcessor def process output = adapter.new(@set, instruction).process output[:set] end private def adapter EnumerableAdapter end def instruction Instructions::Entry.new(page_number, page_size) end def page_number @instructions.get(:page) || 1 end def page_size @instructions.get(:size) || 25 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activeset-0.5.3 | lib/active_set/processors/paginate_processor.rb |