Class: GeoIPs
- Inherits:
-
Object
- Object
- GeoIPs
- Defined in:
- lib/geo_ips.rb,
lib/geo_ips/version.rb
Constant Summary collapse
- BASE_URI =
'http://api.geoips.com'
- VERSION =
"0.1.2"
Instance Attribute Summary collapse
-
#api_key ⇒ Object
writeonly
Sets the attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key) ⇒ GeoIPs
constructor
A new instance of GeoIPs.
- #lookup(ip) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ GeoIPs
Returns a new instance of GeoIPs.
10 11 12 |
# File 'lib/geo_ips.rb', line 10 def initialize api_key @api_key = api_key end |
Instance Attribute Details
#api_key=(value) ⇒ Object (writeonly)
Sets the attribute api_key
8 9 10 |
# File 'lib/geo_ips.rb', line 8 def api_key=(value) @api_key = value end |
Instance Method Details
#lookup(ip) ⇒ Object
14 15 16 |
# File 'lib/geo_ips.rb', line 14 def lookup ip request(ip) end |