Sha256: 7a6b5c11647f512da2b804365cbc8efce8514439ca96702cc0033781c1695ec4

Contents?: true

Size: 395 Bytes

Versions: 25

Compression:

Stored size: 395 Bytes

Contents

module Locomotive::Coal

  class PaginatedResources < SimpleDelegator

    attr_accessor :_page, :_total_pages, :_total_entries

    def initialize(list, page, total_pages, total_entries)
      @_page, @_total_pages, @_total_entries = page, total_pages, total_entries
      super(list)
    end

    def _next_page
      if @_page < @_total_pages
        @_page + 1
      end
    end

  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
locomotivecms_coal-1.8.0.alpha1 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.7.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.6.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.6.0.rc2 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.6.0.rc1 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.6.0.beta1 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.5.1 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.5.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.4.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.3.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.3.0.rc1 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.3.0.rc lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.2.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.1.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.0.0 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.0.0.rc4 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.0.0.rc3 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.0.0.rc2 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.0.0.rc1 lib/locomotive/coal/paginated_resources.rb
locomotivecms_coal-1.0.0.pre.beta.2 lib/locomotive/coal/paginated_resources.rb