Class: GtOneCoercion

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/gt_one_coercion.rb

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object


2
3
4
# File 'lib/gt_one_coercion.rb', line 2

def coerce(value)
  [1, value.to_i].max
end