Sha256: b34625da785db73dba895e204bbd45d2371d3de3b34024a22108c0b3d47a8585

Contents?: true

Size: 225 Bytes

Versions: 2

Compression:

Stored size: 225 Bytes

Contents

module ObjectValidator
  module Checks
    class GreaterThan < Base
      def call
        return if method.is_a?(Numeric) && method > value
        errors.add(name, 'value is less than required')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
object_validator-0.1.1 lib/object_validator/checks/greater_than.rb
object_validator-0.1.0 lib/object_validator/checks/greater_than.rb