Class: Grape::Validations::Types::CoercerCache

Inherits:
Util::Cache
  • Object
show all
Defined in:
lib/grape/validations/types.rb

Instance Attribute Summary

Attributes inherited from Util::Cache

#cache

Instance Method Summary collapse

Constructor Details

#initializeCoercerCache

Returns a new instance of CoercerCache.



189
190
191
192
193
194
# File 'lib/grape/validations/types.rb', line 189

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