Module: AddressFinder
- Defined in:
- lib/addressfinder.rb,
lib/addressfinder/bulk.rb,
lib/addressfinder/util.rb,
lib/addressfinder/errors.rb,
lib/addressfinder/cleanse.rb,
lib/addressfinder/version.rb,
lib/addressfinder/address_info.rb,
lib/addressfinder/configuration.rb,
lib/addressfinder/location_info.rb,
lib/addressfinder/address_search.rb,
lib/addressfinder/location_search.rb
Defined Under Namespace
Classes: AddressInfo, AddressSearch, Bulk, Cleanse, Configuration, LocationInfo, LocationSearch, NotFoundError, RequestRejectedError, Util
Constant Summary
collapse
- VERSION =
'1.5.2'
Class Method Summary
collapse
Class Method Details
.address_info(args = {}) ⇒ Object
46
47
48
|
# File 'lib/addressfinder.rb', line 46
def address_info(args={})
AddressFinder::AddressInfo.new(params: args, http: configure_http).perform.result
end
|
.address_search(args = {}) ⇒ Object
42
43
44
|
# File 'lib/addressfinder.rb', line 42
def address_search(args={})
AddressFinder::AddressSearch.new(params: args, http: configure_http).perform.results
end
|
.bulk(&block) ⇒ Object
50
51
52
53
|
# File 'lib/addressfinder.rb', line 50
def bulk(&block)
AddressFinder::Bulk.new(&block).perform
end
|
.cleanse(args = {}) ⇒ Object
30
31
32
|
# File 'lib/addressfinder.rb', line 30
def cleanse(args={})
AddressFinder::Cleanse.new(args.merge(http: configure_http)).perform.result
end
|
.configuration ⇒ Object
26
27
28
|
# File 'lib/addressfinder.rb', line 26
def configuration
@configuration ||= AddressFinder::Configuration.new
end
|
16
17
18
19
20
21
22
23
24
|
# File 'lib/addressfinder.rb', line 16
def configure(config_hash=nil)
if config_hash
config_hash.each do |k,v|
configuration.send("#{k}=", v) rescue nil if configuration.respond_to?("#{k}=")
end
end
yield(configuration) if block_given?
end
|
.location_info(args = {}) ⇒ Object
38
39
40
|
# File 'lib/addressfinder.rb', line 38
def location_info(args={})
AddressFinder::LocationInfo.new(params: args, http: configure_http).perform.result
end
|
.location_search(args = {}) ⇒ Object
34
35
36
|
# File 'lib/addressfinder.rb', line 34
def location_search(args={})
AddressFinder::LocationSearch.new(params: args, http: configure_http).perform.results
end
|