Exception: MyJohnDeereApi::UnsupportedEnvironmentError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/my_john_deere_api/errors/unsupported_environment_error.rb

Overview

This error is used when an unsupported environment has been requested. Supported environments currently include :sandbox, :live, and :production as a synonym for :live.

Instance Method Summary collapse

Constructor Details

#initialize(environment = nil) ⇒ UnsupportedEnvironmentError

Returns a new instance of UnsupportedEnvironmentError.



8
9
10
11
12
13
14
15
16
# File 'lib/my_john_deere_api/errors/unsupported_environment_error.rb', line 8

def initialize(environment = nil)
  message = if environment
    "The #{environment.inspect} environment is not supported."
  else
    'This environment is not supported.'
  end

  super(message)
end