Sha256: 5da5ca6593c20a76e59bfffec4174af817614e501d0aeba776f0b2993afbd18b

Contents?: true

Size: 517 Bytes

Versions: 20

Compression:

Stored size: 517 Bytes

Contents

require 'forwardable'
module Plucky
  module Pagination
    module Decorator
      extend Forwardable

      def_delegators  :@paginator,
                      :total_entries, :total_pages,
                      :current_page,  :per_page,
                      :previous_page, :next_page,
                      :skip,          :limit, 
                      :offset,        :out_of_bounds?

      def paginator(p=nil)
        return @paginator if p.nil?
        @paginator = p
        self
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
plucky-0.5.2 lib/plucky/pagination/decorator.rb
plucky-0.5.1 lib/plucky/pagination/decorator.rb
plucky-0.5.0 lib/plucky/pagination/decorator.rb
plucky-0.4.4 lib/plucky/pagination/decorator.rb
plucky-0.4.3 lib/plucky/pagination/decorator.rb
plucky-0.4.2 lib/plucky/pagination/decorator.rb
jonbell-plucky-0.3.8 lib/plucky/pagination/decorator.rb
plucky-0.4.1 lib/plucky/pagination/decorator.rb
plucky-0.4.0 lib/plucky/pagination/decorator.rb
plucky-0.3.8 lib/plucky/pagination/decorator.rb
plucky-0.3.7 lib/plucky/pagination/decorator.rb
plucky-0.3.6 lib/plucky/pagination/decorator.rb
plucky-0.3.5 lib/plucky/pagination/decorator.rb
plucky-0.3.4 lib/plucky/pagination/decorator.rb
plucky-0.3.3 lib/plucky/pagination/decorator.rb
plucky-0.3.2 lib/plucky/pagination/decorator.rb
plucky-0.3.1 lib/plucky/pagination/decorator.rb
plucky-0.3.0 lib/plucky/pagination/decorator.rb
plucky-0.2.1 lib/plucky/pagination/decorator.rb
plucky-0.2 lib/plucky/pagination/decorator.rb