IotaSpencer/cloud_party

View on GitHub
lib/cloud_party/exceptions/un_recognized_endpoint_error.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module CloudParty
  module Errors
    ##
    # UnRecognizedEndpointError
    #
    # When an endpoint is not recognized by the gem logic
    class UnRecognizedEndpointError < StandardError
      attr_reader :endpoint, :klass

      def initialize(endpoint, klass)
        super("'#{endpoint}' is not a recognized endpoint for class #{klass}")
        @endpoint = endpoint
        @klass = klass
      end
    end
  end

end