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.
118 119 120 121 122 |
# File 'lib/gcoder/geocoder.rb', line 118 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.
116 117 118 |
# File 'lib/gcoder/geocoder.rb', line 116 def data @data end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
116 117 118 |
# File 'lib/gcoder/geocoder.rb', line 116 def uri @uri end |
Instance Method Details
#as_mash ⇒ Object
124 125 126 |
# File 'lib/gcoder/geocoder.rb', line 124 def as_mash data end |