Class: JsonApiable::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/json_apiable/configuration.rb

Constant Summary collapse

DEFAULT_PAGE_NUMBER =
1
DEFAULT_PAGE_SIZE =
25
MAX_PAGE_SIZE =

2^32 / 2 * 10: greater than which raises a java.lang.ArrayIndexOutOfBoundsException exception in Solr

214_748_364

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
# File 'lib/json_apiable/configuration.rb', line 12

def initialize
  @valid_query_params = %w[id user_id access_token filter include page]
  @supported_media_type_proc = nil
  @not_found_exception_class = ActiveRecord::RecordNotFound
  @page_size = DEFAULT_PAGE_SIZE
end

Instance Attribute Details

#not_found_exception_classObject

Returns the value of attribute not_found_exception_class.



5
6
7
# File 'lib/json_apiable/configuration.rb', line 5

def not_found_exception_class
  @not_found_exception_class
end

#page_sizeObject

Returns the value of attribute page_size.



5
6
7
# File 'lib/json_apiable/configuration.rb', line 5

def page_size
  @page_size
end

#supported_media_type_procObject

Returns the value of attribute supported_media_type_proc.



5
6
7
# File 'lib/json_apiable/configuration.rb', line 5

def supported_media_type_proc
  @supported_media_type_proc
end

#valid_query_paramsObject

Returns the value of attribute valid_query_params.



5
6
7
# File 'lib/json_apiable/configuration.rb', line 5

def valid_query_params
  @valid_query_params
end