Exception: ApiRecipes::NoConfigurationGivenForEndpoint

Inherits:
Exception
  • Object
show all
Defined in:
lib/api_recipes/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, endpoint = nil) ⇒ NoConfigurationGivenForEndpoint

Returns a new instance of NoConfigurationGivenForEndpoint.



62
63
64
65
66
67
68
69
70
# File 'lib/api_recipes/exceptions.rb', line 62

def initialize(message = nil, endpoint = nil)
  @endpoint = endpoint
  if message
    # Nothing to do
  else
    message = "no configuration provided for endpoint '#{@endpoint}'"
  end
  super(message)
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



60
61
62
# File 'lib/api_recipes/exceptions.rb', line 60

def endpoint
  @endpoint
end