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.5.0 lib/alula/meta.rb
alula-ruby-1.4.0 lib/alula/meta.rb
alula-ruby-1.3.0 lib/alula/meta.rb
alula-ruby-1.2.4 lib/alula/meta.rb
alula-ruby-1.2.3 lib/alula/meta.rb
alula-ruby-1.2.2 lib/alula/meta.rb
alula-ruby-1.2.1 lib/alula/meta.rb
alula-ruby-1.2.0 lib/alula/meta.rb
alula-ruby-1.1.0 lib/alula/meta.rb
alula-ruby-1.0.2 lib/alula/meta.rb
alula-ruby-0.69.11 lib/alula/meta.rb
alula-ruby-1.0.1 lib/alula/meta.rb
alula-ruby-0.69.10 lib/alula/meta.rb
alula-ruby-1.0.0 lib/alula/meta.rb
alula-ruby-0.69.9 lib/alula/meta.rb
alula-ruby-0.69.8 lib/alula/meta.rb
alula-ruby-0.69.7 lib/alula/meta.rb
alula-ruby-0.69.6 lib/alula/meta.rb
alula-ruby-0.69.5 lib/alula/meta.rb
alula-ruby-0.69.4 lib/alula/meta.rb