Class: Yukata::Coercions::HashDefinitions

Inherits:
Object
  • Object
show all
Defined in:
lib/yukata/coercions/hash_definitions.rb

Class Method Summary collapse

Class Method Details

.bind_to(coercer) ⇒ Object



4
5
6
7
# File 'lib/yukata/coercions/hash_definitions.rb', line 4

def self.bind_to(coercer)
  coercer.register(Hash, String) { |obj, _| obj.to_s }
  coercer.register(Hash, Array)  { |obj, _| obj.to_a }
end