Module: Jat::Plugins::JsonApiLowerCamelCase

Defined in:
lib/jat/plugins/json_api/plugins/json_api_lower_camel_case/json_api_lower_camel_case.rb

Defined Under Namespace

Modules: ResponseInstanceMethods

Class Method Summary collapse

Class Method Details

.before_load(jat_class, **_opts) ⇒ Object

Raises:



10
11
12
13
14
# File 'lib/jat/plugins/json_api/plugins/json_api_lower_camel_case/json_api_lower_camel_case.rb', line 10

def self.before_load(jat_class, **_opts)
  raise Error, "Please load :json_api plugin first" unless jat_class.plugin_used?(:json_api)

  jat_class.plugin :base_lower_camel_case
end

.load(jat_class, **_opts) ⇒ Object



16
17
18
# File 'lib/jat/plugins/json_api/plugins/json_api_lower_camel_case/json_api_lower_camel_case.rb', line 16

def self.load(jat_class, **_opts)
  jat_class::Response.include(ResponseInstanceMethods)
end

.plugin_nameObject



6
7
8
# File 'lib/jat/plugins/json_api/plugins/json_api_lower_camel_case/json_api_lower_camel_case.rb', line 6

def self.plugin_name
  :json_api_lower_camel_case
end