Class: Extant::Coercers::Integer
- Defined in:
- lib/extant/coercers/integer.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#coerced?, coercer_name, #initialize
Constructor Details
This class inherits a constructor from Extant::Coercers::Base
Instance Method Details
#coerce ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/extant/coercers/integer.rb', line 3 def coerce result = Integer(value) self.coerced = true result rescue ArgumentError, TypeError UncoercedValue end |