Sha256: ed9b6fa8198c6089626eba9cc443c0a336d2944b8fd72ccb2fb4b3f714cd8c44

Contents?: true

Size: 296 Bytes

Versions: 1

Compression:

Stored size: 296 Bytes

Contents

module FubClient
  class Resource
    include Her::Model
    use_api FubClient::Client.instance.her_api
    
    scope :by_page, -> (page, per_page) { 
      where(offset: (page - 1)*per_page, limit: per_page) 
    }
    
    def self.total
      by_page(1, 1).metadata[:total]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fub_client-0.1.1 lib/fub_client/resource.rb