debian-mirror-gitlab/lib/gt_one_coercion.rb

6 lines
94 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
class GtOneCoercion < Virtus::Attribute
def coerce(value)
[1, value.to_i].max
end
end