Class: JSONAPI::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
13
14
15
# File 'lib/jsonapi/configuration.rb', line 7

def initialize
  #:underscored_key, :camelized_key, :dasherized_key, or custom
  self.json_key_format = :underscored_key

  #:underscored_route, :camelized_route, :dasherized_route, or custom
  self.route_format = :underscored_route

  self.allowed_request_params = [:include, :fields, :format, :controller, :action, :sort]
end

Instance Attribute Details

#allowed_request_paramsObject

Returns the value of attribute allowed_request_params.



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

def allowed_request_params
  @allowed_request_params
end

#json_key_formatObject

Returns the value of attribute json_key_format.



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

def json_key_format
  @json_key_format
end

#key_formatterObject (readonly)

Returns the value of attribute key_formatter.



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

def key_formatter
  @key_formatter
end

#route_formatObject

Returns the value of attribute route_format.



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

def route_format
  @route_format
end

#route_formatterObject (readonly)

Returns the value of attribute route_formatter.



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

def route_formatter
  @route_formatter
end