Module: Igsearch
- Defined in:
- lib/igsearch.rb,
lib/igsearch/person.rb,
lib/igsearch/version.rb
Defined Under Namespace
Classes: Person
Constant Summary collapse
- VERSION =
"0.0.3"
Class Attribute Summary collapse
-
.apikey ⇒ Object
Public: Your Infogroup API key.
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
Public: Set global options.
- .live_api? ⇒ Boolean
-
.reset! ⇒ Object
Public: Reset the configuration to the defaults.
Class Attribute Details
.apikey ⇒ Object
Public: Your Infogroup API key.
24 25 26 |
# File 'lib/igsearch.rb', line 24 def apikey @apikey end |
Class Method Details
.configure {|_self| ... } ⇒ Object
Public: Set global options.
Yields the Igsearch module so you can set options on it.
Returns self.
10 11 12 13 14 15 |
# File 'lib/igsearch.rb', line 10 def self.configure yield self # TODO: find a better way to do this self::Person.default_params :apikey => self.apikey self end |
.live_api? ⇒ Boolean
7 8 9 |
# File 'lib/igsearch/person.rb', line 7 def self.live_api? HTTParty.get('http://api.infoconnect.com/v1/').code == 200 end |
.reset! ⇒ Object
Public: Reset the configuration to the defaults. Useful for testing.
Returns nil.
19 20 21 |
# File 'lib/igsearch.rb', line 19 def self.reset! @apikey = nil end |