Class: Opennorth::Represent::Real
- Inherits:
-
Object
- Object
- Opennorth::Represent::Real
- Defined in:
- lib/opennorth/represent.rb,
lib/opennorth/represent/requests/get_postal_code.rb
Instance Method Summary collapse
- #get_postal_code(postal_code) ⇒ Object
-
#initialize(options = {}) ⇒ Real
constructor
A new instance of Real.
- #request(options = {}) ⇒ Object
Constructor Details
Instance Method Details
#get_postal_code(postal_code) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/opennorth/represent/requests/get_postal_code.rb', line 6 def get_postal_code(postal_code) response = request(path: postal_code_path(postal_code), method: :get) response.body = JSON::parse(response.body) response end |
#request(options = {}) ⇒ Object
22 23 24 |
# File 'lib/opennorth/represent.rb', line 22 def request(={}) connection.request() end |