class RDStation::ErrorHandler::Unauthorized

Constants

UNAUTHORIZED_ERRORS

Public Class Methods

new(array_of_errors) click to toggle source
# File lib/rdstation/error_handler/unauthorized.rb, line 16
def initialize(array_of_errors)
  @array_of_errors = array_of_errors
end

Public Instance Methods

raise_error() click to toggle source
# File lib/rdstation/error_handler/unauthorized.rb, line 20
def raise_error
  error_classes.each(&:raise_error)
  raise RDStation::Error::Unauthorized, @array_of_errors.first
end

Private Instance Methods

error_classes() click to toggle source
# File lib/rdstation/error_handler/unauthorized.rb, line 27
def error_classes
  UNAUTHORIZED_ERRORS.map do |error|
    error.new(@array_of_errors)
  end
end