Module: RailsParamValidation::CustomTypesExtension::ClassMethods

Defined in:
lib/rails-param-validation/rails/extensions/custom_type_extension.rb

Instance Method Summary collapse

Instance Method Details

#declare(type, schema) ⇒ Object



8
9
10
11
# File 'lib/rails-param-validation/rails/extensions/custom_type_extension.rb', line 8

def declare(type, schema)
  namespace = Types::Namespace.fetch(Types::Namespace.caller_file)
  RailsParamValidation::AnnotationTypes::CustomT.register Types::Namespace.with_namespace(namespace, type), schema
end