Skip to content

Commit 6181713

Browse files
committed
Fix Ruby examples
1 parent fba3cbb commit 6181713

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

content/geoip/geolocate-an-ip/web-services.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,16 @@ async_client = AsyncClient(account_id, license_key, host='geolite.info')
155155
```
156156

157157
```ruby
158-
Minfraud.configure do |c|
159-
c.account_id = 10
160-
c.license_key = 'LICENSEKEY'
158+
require 'maxmind/geoip2'
159+
160+
client = MaxMind::GeoIP2::Client.new(
161+
account_id: 10,
162+
license_key: 'LICENSEKEY',
161163

162164
# To use the GeoLite web service instead of GeoIP, set the host
163165
# parameter to "geolite.info", eg:
164-
# host: 'geolite.info'
165-
end
166+
# host: 'geolite.info',
167+
)
166168
```
167169

168170
{{< /codeset >}}
@@ -285,13 +287,13 @@ asyncio.run(main())
285287
```ruby
286288
require 'maxmind/geoip2'
287289

288-
Minfraud.configure do |c|
289-
c.account_id = 10
290-
c.license_key = 'LICENSEKEY'
291-
end
290+
client = MaxMind::GeoIP2::Client.new(
291+
account_id: 10,
292+
license_key: 'LICENSEKEY',
293+
)
292294

293-
# You can also use `client.city` or `client.insights`
294-
# `client.insights` is not available to GeoLite users
295+
# You can also use `client.city` or `client.insights`.
296+
# Note that `client.insights` is not available to GeoLite users.
295297
record = client.country('128.101.101.101')
296298

297299
puts record.country.iso_code

0 commit comments

Comments
 (0)