Sha256: ad3b4c53a539c741d69e5a1dbd9f0b422f1c9223160c12a020235fbb647686b1

Contents?: true

Size: 1013 Bytes

Versions: 1

Compression:

Stored size: 1013 Bytes

Contents

module Domainic
  module Attributer
    # A specialized error class for coercion execution failures
    #
    # This error class is used when a coercion fails during attribute value
    # processing. It captures the failing coercer to provide context about which
    # step in the coercion chain caused the failure
    #
    # @author {https://aaronmallen.me Aaron Allen}
    # @since 0.2.0
    class CoercionExecutionError < Error
      # Get the coercer that failed
      #
      # @return [Proc, Symbol] the coercer that failed
      attr_reader coercer: Attribute::Coercer::handler

      # Initialize a new CoercionExecutionError instance
      #
      # @api private
      # @!visibility private
      #
      # @param message [String] the error message
      # @param coercer [Proc, Symbol] the coercer that failed
      #
      # @return [CoercionExecutionError] the new CoercionExecutionError instance
      def initialize: (String message, Attribute::Coercer::handler coercer) -> void
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
domainic-attributer-0.2.0 sig/domainic/attributer/errors/coercion_execution_error.rbs