Sha256: f037ecf0452897457e6eedb7f227677ca04398978e32a6af64b352f9a59edc3b

Contents?: true

Size: 353 Bytes

Versions: 81

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

81 entries across 81 versions & 1 rubygems

Version Path
alula-ruby-2.6.1 lib/alula/meta.rb
alula-ruby-2.6.0 lib/alula/meta.rb
alula-ruby-2.5.0 lib/alula/meta.rb
alula-ruby-2.4.0 lib/alula/meta.rb
alula-ruby-2.3.0 lib/alula/meta.rb
alula-ruby-2.2.0 lib/alula/meta.rb
alula-ruby-2.1.2 lib/alula/meta.rb
alula-ruby-2.1.1 lib/alula/meta.rb
alula-ruby-2.1.0 lib/alula/meta.rb
alula-ruby-2.0.0 lib/alula/meta.rb
alula-ruby-1.10.5 lib/alula/meta.rb
alula-ruby-1.10.4 lib/alula/meta.rb
alula-ruby-1.10.3 lib/alula/meta.rb
alula-ruby-1.10.2 lib/alula/meta.rb
alula-ruby-1.10.1 lib/alula/meta.rb
alula-ruby-1.10.0 lib/alula/meta.rb
alula-ruby-1.9.17 lib/alula/meta.rb
alula-ruby-1.9.16 lib/alula/meta.rb
alula-ruby-1.9.15 lib/alula/meta.rb
alula-ruby-1.9.14 lib/alula/meta.rb