debian-mirror-gitlab/lib/gt_one_coercion.rb
2014-09-02 14:37:02 +02:00

5 lines
94 B
Ruby

class GtOneCoercion < Virtus::Attribute
def coerce(value)
[1, value.to_i].max
end
end