Class: Croesus::Coercions::BooleanDefinitions

Inherits:
Object
  • Object
show all
Defined in:
lib/croesus/coercions/boolean_definitions.rb

Class Method Summary collapse

Class Method Details

.bind_to(coercer) ⇒ Object



27
28
29
30
# File 'lib/croesus/coercions/boolean_definitions.rb', line 27

def self.bind_to(coercer)
  coercer.register(TrueClass, String) { |o, _| 'true' }
  coercer.register(FalseClass, String) { |o, _| 'false' }
end