Sha256: f037ecf0452897457e6eedb7f227677ca04398978e32a6af64b352f9a59edc3b

Contents?: true

Size: 353 Bytes

Versions: 83

Compression:

Stored size: 353 Bytes

Contents

module Alula
  class Meta
    attr_reader :page, :total, :number, :size

    def initialize(meta)
      return unless meta['page']

      @page = Alula::Pagination.new(meta['page'])

      # TODO: TJ Deprecate, the meta can hold a lot more than the page
      @total = @page.total
      @number = @page.number
      @size = @page.size
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
alula-ruby-1.9.15 lib/alula/meta.rb
alula-ruby-1.9.14 lib/alula/meta.rb
alula-ruby-1.9.13 lib/alula/meta.rb
alula-ruby-1.9.12 lib/alula/meta.rb
alula-ruby-1.9.11 lib/alula/meta.rb
alula-ruby-1.9.10 lib/alula/meta.rb
alula-ruby-1.9.9 lib/alula/meta.rb
alula-ruby-1.9.8 lib/alula/meta.rb
alula-ruby-1.9.7 lib/alula/meta.rb
alula-ruby-1.9.6 lib/alula/meta.rb
alula-ruby-1.9.5 lib/alula/meta.rb
alula-ruby-1.9.4 lib/alula/meta.rb
alula-ruby-1.9.3 lib/alula/meta.rb
alula-ruby-1.9.2 lib/alula/meta.rb
alula-ruby-1.9.1 lib/alula/meta.rb
alula-ruby-1.9.0 lib/alula/meta.rb
alula-ruby-1.8.1 lib/alula/meta.rb
alula-ruby-1.8.0 lib/alula/meta.rb
alula-ruby-1.7.0 lib/alula/meta.rb
alula-ruby-1.6.0 lib/alula/meta.rb