summaryrefslogtreecommitdiff
path: root/lib/gt_one_coercion.rb
blob: 99be51bc8c63fc649136e12ada761d73447bc411 (plain)
1
2
3
4
5
6
7
# frozen_string_literal: true

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