Module: Jat::Plugins::SimpleApiValidateParams

Defined in:
lib/jat/plugins/simple_api/plugins/simple_api_validate_params/lib/validate_fields_param.rb,
lib/jat/plugins/simple_api/plugins/simple_api_validate_params/simple_api_validate_params.rb

Defined Under Namespace

Modules: ClassMethods, FieldsParamParserMethods, InstanceMethods Classes: ValidateFieldsParam

Class Method Summary collapse

Class Method Details

.before_load(jat_class, **_opts) ⇒ Object

Raises:



13
14
15
16
# File 'lib/jat/plugins/simple_api/plugins/simple_api_validate_params/simple_api_validate_params.rb', line 13

def self.before_load(jat_class, **_opts)
  return if jat_class.plugin_used?(:simple_api)
  raise Error, "Please load :simple_api plugin first"
end

.load(jat_class, **_opts) ⇒ Object



18
19
20
21
22
23
# File 'lib/jat/plugins/simple_api/plugins/simple_api_validate_params/simple_api_validate_params.rb', line 18

def self.load(jat_class, **_opts)
  jat_class.extend(ClassMethods)
  jat_class.include(InstanceMethods)

  jat_class::FieldsParamParser.include(FieldsParamParserMethods)
end

.plugin_nameObject



9
10
11
# File 'lib/jat/plugins/simple_api/plugins/simple_api_validate_params/simple_api_validate_params.rb', line 9

def self.plugin_name
  :simple_api_validate_params
end