gitlab-org--gitlab-foss/lib/gt_one_coercion.rb

6 lines
94 B
Ruby
Raw Normal View History

2014-08-02 11:12:01 -04:00
class GtOneCoercion < Virtus::Attribute
def coerce(value)
[1, value.to_i].max
end
end