Module: Ip2Location
- Defined in:
- lib/ip2location.rb,
lib/ip2location/base.rb,
lib/ip2location/request.rb,
lib/ip2location/version.rb
Defined Under Namespace
Classes: APIConnectionError, Base, InvalidApiKeyError, Location, NoLocationDataError, Request
Constant Summary collapse
- BASE_URI =
"http://api.ip2locationapi.com/"
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
- .request(ip) ⇒ Object (also: ip2l)
- .setup {|_self| ... } ⇒ Object
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
14 15 16 |
# File 'lib/ip2location.rb', line 14 def api_key @api_key end |
.user ⇒ Object
Returns the value of attribute user.
14 15 16 |
# File 'lib/ip2location.rb', line 14 def user @user end |
Class Method Details
.request(ip) ⇒ Object Also known as: ip2l
20 21 22 |
# File 'lib/ip2location.rb', line 20 def request(ip) Ip2Location::Request.ip2l(ip) end |
.setup {|_self| ... } ⇒ Object
16 17 18 |
# File 'lib/ip2location.rb', line 16 def setup yield self if block_given? end |