Exception: NYCGeoClient::Error

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

Overview

Custom error class for rescuing from all NYCGeoClient errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status = nil) ⇒ Error

Returns a new instance of Error.



6
7
8
9
# File 'lib/nyc_geo_client/error.rb', line 6

def initialize(message, status=nil)
  super(message)
  @status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/nyc_geo_client/error.rb', line 4

def status
  @status
end