Exception: Weatheruby::WeatherError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/weatheruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json, type, description) ⇒ WeatherError

Returns a new instance of WeatherError



12
13
14
15
16
# File 'lib/weatheruby.rb', line 12

def initialize(json, type, description)
  @full_response = json
  @type = type
  @description = description
end

Instance Attribute Details

#full_responseHash (readonly)

Returns The full parsed HTTP response

Returns:

  • (Hash)

    The full parsed HTTP response



10
11
12
# File 'lib/weatheruby.rb', line 10

def full_response
  @full_response
end

Instance Method Details

#messageObject



18
19
20
# File 'lib/weatheruby.rb', line 18

def message
  "#{@type}: #{@description}"
end