Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit fa85bc3

Browse files
committed
Notes added
pull/1 - thanks to kplawver
1 parent f9d650b commit fa85bc3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ipstack/api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
module Ipstack
77
class API
8-
# Make sure we can access parameters of the object
9-
attr_accessor :api_url, :content_type, :access_key, :optionals, :params_uri, :return_raw
8+
attr_accessor :api_url, :content_type, :access_key, :optionals, :params_uri, :return_raw # Make sure we can access parameters of the object in methods
109
def initialize(optionals = {}, access_key = ENV['IPSTACK_ACCESS_KEY'])
1110

1211
raise ArgumentError, 'Requires a hash of optional values found on https://ipstack.com/documentation' unless optionals.is_a?(Hash)
1312
raise ArgumentError, '\'access_key\' (api key) cannot be nil. Obtain your key from https://ipstack.com/quickstart and set it as ENV[\'IPSTACK_ACCESS_KEY\']' if access_key.nil? || access_key == ''
1413

14+
# non-ipstack api custom optionals
1515
@return_raw = optionals[:return_raw]
1616
optionals.delete(:return_raw) # remove it from optionals since we each optionals for our url params
1717

lib/ipstack/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Ipstack
2-
VERSION = '0.1.0'
2+
VERSION = '0.1.1'
33
end

0 commit comments

Comments
 (0)