Module: Where
- Defined in:
- lib/where.rb,
lib/where/base.rb,
lib/where/address.rb,
lib/where/version.rb,
lib/where/ip_address.rb
Defined Under Namespace
Classes: Address, Base, IpAddress
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Method Summary
collapse
Class Method Details
.is(address = "", opts = {}) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/where.rb', line 7
def self.is(address = "", opts={})
if address.to_s.match(/^(\d{1,3}\.){3}\d{1,3}$/)
Where::IpAddress.geocode(address, opts)
else
Where::Address.geocode(address, opts)
end
end
|