Class: Extant::Coercers::HashCoercerBuilder
- Inherits:
-
Object
- Object
- Extant::Coercers::HashCoercerBuilder
- Defined in:
- lib/extant/coercers/hash.rb
Class Method Summary collapse
Class Method Details
.build(opts) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/extant/coercers/hash.rb', line 49 def self.build(opts) key_type_local = Extant::Coercers.find(opts[:hash_format].keys.first) value_type_local = Extant::Coercers.find(opts[:hash_format].values.first) Class.new(Extant::Coercers::Hash) do self.key_type = key_type_local self.value_type = value_type_local def self.coercer_name 'hash' end end end |