Class: Grape::Validations::Types::CoercerCache
- Inherits:
-
Util::Cache
- Object
- Util::Cache
- Grape::Validations::Types::CoercerCache
- Defined in:
- lib/grape/validations/types.rb
Instance Attribute Summary
Attributes inherited from Util::Cache
Instance Method Summary collapse
-
#initialize ⇒ CoercerCache
constructor
A new instance of CoercerCache.
Constructor Details
#initialize ⇒ CoercerCache
Returns a new instance of CoercerCache.
182 183 184 185 186 187 |
# File 'lib/grape/validations/types.rb', line 182 def initialize super @cache = Hash.new do |h, (type, method, strict)| h[[type, method, strict]] = Grape::Validations::Types.create_coercer_instance(type, method, strict) end end |