debian-mirror-gitlab/lib/gt_one_coercion.rb
2018-12-13 13:39:08 +05:30

7 lines
125 B
Ruby

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