Sha256: 73cb6041b35856d5ec7748e6127e9d9141fa536bcb61a0990178b12c3fb82e22

Contents?: true

Size: 268 Bytes

Versions: 4

Compression:

Stored size: 268 Bytes

Contents

module Virtus
  class Attribute

    module Strict

      # @api public
      def coerce(input)
        coerced = super
        raise ArgumentError unless coercer.success?(primitive, coerced)
        coerced
      end

    end # Strict

  end # Attribute
end # Virtus

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
virtus-1.0.0.beta6 lib/virtus/attribute/strict.rb
virtus-1.0.0.beta5 lib/virtus/attribute/strict.rb
virtus-1.0.0.beta4 lib/virtus/attribute/strict.rb
virtus-1.0.0.beta3 lib/virtus/attribute/strict.rb