class Extant::Coercers::HashCoercerBuilder

Public Class Methods

build(opts) click to toggle source
# 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
coercer_name() click to toggle source
# File lib/extant/coercers/hash.rb, line 57
def self.coercer_name
  'hash'
end