Sha256: f22a793a8f2fb4aee239b8d89866e03da5caa17792a95363f7ddcd834df517a2
Contents?: true
Size: 509 Bytes
Versions: 16
Compression:
Stored size: 509 Bytes
Contents
module Virtus class Attribute # Attribute extension which raises CoercionError when coercion failed # module Strict # @see [Attribute#coerce] # # @raises [CoercionError] when coercer failed # # @api public def coerce(*) output = super if value_coerced?(output) || !required? && output.nil? output else raise CoercionError.new(output, self) end end end # Strict end # Attribute end # Virtus
Version data entries
16 entries across 14 versions & 5 rubygems