Class: Opennorth::Represent::Mock
- Inherits:
-
Object
- Object
- Opennorth::Represent::Mock
- 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 = {}) ⇒ Mock
constructor
A new instance of Mock.
Constructor Details
#initialize(options = {}) ⇒ Mock
38 39 40 |
# File 'lib/opennorth/represent.rb', line 38 def initialize(={}) end |
Instance Method Details
#get_postal_code(postal_code) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/opennorth/represent/requests/get_postal_code.rb', line 21 def get_postal_code(postal_code) Excon::Response.new.tap do |response| response.status = 200 response.body = JSON::parse(data) end end |