Class: MelissaData::Client::Base
- Inherits:
-
Object
- Object
- MelissaData::Client::Base
- Defined in:
- lib/melissadata/client/base.rb
Instance Attribute Summary collapse
-
#rpc ⇒ Object
readonly
Returns the value of attribute rpc.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
- #process(opts = {}) ⇒ Object
- #process_address(address = nil, zip = nil, city = nil, state = nil) ⇒ Object (also: #address)
- #process_email(email = nil) ⇒ Object (also: #email)
- #process_geo(zip = nil, plus4 = nil, dpc = nil) ⇒ Object (also: #geo)
- #process_ip(ip) ⇒ Object (also: #ip)
- #process_name(first_name = nil, last_name = nil) ⇒ Object (also: #name)
- #process_phone(phone = nil, zip = nil) ⇒ Object (also: #phone)
- #version ⇒ Object
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
13 14 15 |
# File 'lib/melissadata/client/base.rb', line 13 def initialize(*args) raise 'I should have been subclassed' end |
Instance Attribute Details
#rpc ⇒ Object (readonly)
Returns the value of attribute rpc.
7 8 9 |
# File 'lib/melissadata/client/base.rb', line 7 def rpc @rpc end |
Class Method Details
.available? ⇒ Boolean
9 10 11 |
# File 'lib/melissadata/client/base.rb', line 9 def self.available? raise 'I should have been subclassed' end |
Instance Method Details
#process(opts = {}) ⇒ Object
17 18 19 |
# File 'lib/melissadata/client/base.rb', line 17 def process(opts={}) rpc.call :process, opts end |
#process_address(address = nil, zip = nil, city = nil, state = nil) ⇒ Object Also known as: address
21 22 23 |
# File 'lib/melissadata/client/base.rb', line 21 def process_address(address=nil, zip=nil, city=nil, state=nil) rpc.call :process_address, address, zip, city, state end |
#process_email(email = nil) ⇒ Object Also known as: email
26 27 28 |
# File 'lib/melissadata/client/base.rb', line 26 def process_email(email=nil) rpc.call :process_email, email end |
#process_geo(zip = nil, plus4 = nil, dpc = nil) ⇒ Object Also known as: geo
31 32 33 |
# File 'lib/melissadata/client/base.rb', line 31 def process_geo(zip=nil, plus4=nil, dpc=nil) rpc.call :process_geo, zip, plus4, dpc end |
#process_ip(ip) ⇒ Object Also known as: ip
46 47 48 |
# File 'lib/melissadata/client/base.rb', line 46 def process_ip(ip) rpc.call :process_ip, ip end |
#process_name(first_name = nil, last_name = nil) ⇒ Object Also known as: name
36 37 38 |
# File 'lib/melissadata/client/base.rb', line 36 def process_name(first_name=nil, last_name=nil) rpc.call :process_name, first_name, last_name end |
#process_phone(phone = nil, zip = nil) ⇒ Object Also known as: phone
41 42 43 |
# File 'lib/melissadata/client/base.rb', line 41 def process_phone(phone=nil, zip=nil) rpc.call :process_phone, phone, zip end |
#version ⇒ Object
51 52 53 |
# File 'lib/melissadata/client/base.rb', line 51 def version rpc.call :version end |