Class: Opennorth::Represent::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/opennorth/represent.rb,
lib/opennorth/represent/requests/get_postal_code.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock



38
39
40
# File 'lib/opennorth/represent.rb', line 38

def initialize(options={})

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