class JsonApiable::Configuration
Constants
- DEFAULT_PAGE_NUMBER
- DEFAULT_PAGE_SIZE
- MAX_PAGE_SIZE
2^32 / 2 * 10: greater than which raises a java.lang.ArrayIndexOutOfBoundsException exception in Solr
Attributes
not_found_exception_class[RW]
page_size[RW]
supported_media_type_proc[RW]
valid_query_params[RW]
Public Class Methods
new()
click to toggle source
# 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
Public Instance Methods
not_found_exception_class=(klass)
click to toggle source
# File lib/json_apiable/configuration.rb, line 29 def not_found_exception_class=(klass) raise JsonApiable::ConfigurationError, 'Should be a class' unless klass.is_a?(Class) @not_found_exception_class = klass end
supported_media_type_proc=(prok)
click to toggle source
# File lib/json_apiable/configuration.rb, line 24 def supported_media_type_proc=(prok) raise JsonApiable::ConfigurationError, 'Should be a proc' unless prok.is_a?(Proc) @supported_media_type_proc = prok end
valid_query_params=(value)
click to toggle source
# File lib/json_apiable/configuration.rb, line 19 def valid_query_params=(value) raise JsonApiable::ConfigurationError, 'Should be an array containing strings' unless value.is_a?(Array) @valid_query_params = value end