Class: MelissaData::Client::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/melissadata/client/base.rb

Direct Known Subclasses

TCP, Unix

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#rpcObject (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

Returns:

  • (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

#versionObject



51
52
53
# File 'lib/melissadata/client/base.rb', line 51

def version
  rpc.call :version
end