```ruby
module Yaks
  class Primitivize
    include Concord.new(:object)

    def self.call(object)
      new(object).call
    end

    def call
      case object
      when String, TrueClass, FalseClass, NilClass, Numeric
        object
      when Symbol
        object.to_s
      when Hash, Hamster::Hash
        object.to_enum(:each).with_object({}) do |(key, value), output|
          output[self.class.(key)] = self.class.(value)
        end
      when Enumerable, Hamster::Enumerable
        object.map(&self.class.method(:call)).to_a
      else
        raise "don't know how to turn #{object.class} (#{object.inspect}) into a primitive"
      end
    end
  end
end
```

Make Primitivize extensible, useful for dates/timestamps. Releasing v0.1.0
user
```ruby
module Yaks
  class Primitivize
    include Concord.new(:object)

    # TODO Global config, make this extensible in a per-instance way
    MAPPINGS = {}

    def self.call(object)
      new(object).call
    end

    def self.map(*types, &blk)
      types.each do |type|
        MAPPINGS[type] = blk
      end
    end

    map String, TrueClass, FalseClass, NilClass, Numeric do
      object
    end

    map Symbol do
      object.to_s
    end

    map Hash, Hamster::Hash do
      object.to_enum(:each).with_object({}) do |(key, value), output|
        output[self.class.(key)] = self.class.(value)
      end
    end

    map Enumerable, Hamster::Enumerable do
      object.map(&self.class.method(:call)).to_a
    end

    def call
      MAPPINGS.each do |pattern, block|
        return instance_eval(&block) if pattern === object
      end
      raise "don't know how to turn #{object.class} (#{object.inspect}) into a primitive"
    end
  end
end
```
assistant