Sha256: 5bbfc5af0d13382c48f585d4a1ef75c925f90fcad0e58b986cb241b1f72af986

Contents?: true

Size: 201 Bytes

Versions: 2

Compression:

Stored size: 201 Bytes

Contents

module ObjectValidator
  module Checks
    class With < Base
      def call
        fail unless value[:proc].call(object)
      rescue
        errors.add(name, value[:msg])
      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/with.rb
object_validator-0.1.0 lib/object_validator/checks/with.rb