Class: ValidateParams::Core

Inherits:
Object
  • Object
show all
Defined in:
lib/validate_params/core.rb

Constant Summary collapse

OPTIONS =
i(type default size cast in range regex custom).freeze
CAST_TYPES =
i(Integer Array Float).freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params, args) ⇒ Core

Returns a new instance of Core.



13
14
15
16
17
18
# File 'lib/validate_params/core.rb', line 13

def initialize(params, args)
  @params = params
  @args   = args

  proceed
end

Class Method Details

.validate!(params, args) ⇒ Object



8
9
10
# File 'lib/validate_params/core.rb', line 8

def validate!(params, args)
  new(params, args)
end