Class: TrestleData::Client

Inherits:
Object
  • Object
show all
Includes:
API::ReversePhone, Configurable
Defined in:
lib/trestle-data/client.rb

Constant Summary

Constants included from API::ReversePhone

API::ReversePhone::API_VERSION

Constants included from API::Util

API::Util::ROOT_URL

Instance Attribute Summary

Attributes included from Configurable

#api_key

Instance Method Summary collapse

Methods included from API::ReversePhone

#api_key_valid?, #reverse_lookup

Methods included from API::Util

#build_url, #call, #phone_number_valid?

Methods included from Configurable

#configure, keys

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
# File 'lib/trestle-data/client.rb', line 10

def initialize(options={})
				TrestleData::Configurable.keys.each do |key|
   		instance_variable_set(:"@#{key}", options[key] || TrestleData.instance_variable_get(:"@#{key}"))
 		end
end