Module: TinyClient::PaginationSupport

Included in:
Resource
Defined in:
lib/tiny_client/pagination_support.rb

Overview

Mixin that add support for limit/offset pagination to Resource

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(resource_class) ⇒ Object

Raises:

  • (ArgumentError)


4
5
6
7
# File 'lib/tiny_client/pagination_support.rb', line 4

def self.included(resource_class)
  raise ArgumentError, 'Works only for TinyClient::Resource' unless resource_class <= Resource
  resource_class.extend(ClassMethods)
end