summaryrefslogtreecommitdiff
path: root/lib/gt_one_coercion.rb
blob: ef2dc09767cc09a5864ddc0b9420a492a9df9f02 (plain)
1
2
3
4
5
class GtOneCoercion < Virtus::Attribute
  def coerce(value)
    [1, value.to_i].max
  end
end