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-0.52.0 lib/alula/meta.rb
alula-ruby-0.51.0 lib/alula/meta.rb
alula-ruby-0.50.1 lib/alula/meta.rb