Class: GCoder::Geocoder::Response
- Inherits:
-
Object
- Object
- GCoder::Geocoder::Response
- Defined in:
- lib/gcoder/geocoder.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #as_mash ⇒ Object
-
#initialize(uri, data) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(uri, data) ⇒ Response
Returns a new instance of Response.
116 117 118 119 120 |
# File 'lib/gcoder/geocoder.rb', line 116 def initialize(uri, data) @uri = uri @data = Hashie::Mash.new(data) validate_status! end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
114 115 116 |
# File 'lib/gcoder/geocoder.rb', line 114 def data @data end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
114 115 116 |
# File 'lib/gcoder/geocoder.rb', line 114 def uri @uri end |
Instance Method Details
#as_mash ⇒ Object
122 123 124 |
# File 'lib/gcoder/geocoder.rb', line 122 def as_mash data end |