Class: MelissaData::Client::Unix

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

Instance Attribute Summary

Attributes inherited from Base

#rpc

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#process, #process_address, #process_email, #process_geo, #process_ip, #process_name, #process_phone, #version

Constructor Details

#initializeUnix

Returns a new instance of Unix.



16
17
18
19
# File 'lib/melissadata/client/unix.rb', line 16

def initialize
  transport = MessagePack::RPC::UNIXTransport.new
  @rpc = MessagePack::RPC::Client.new transport, self.class.socket_file
end

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/melissadata/client/unix.rb', line 8

def self.available?
  File.exists? socket_file
end

.socket_fileObject



12
13
14
# File 'lib/melissadata/client/unix.rb', line 12

def self.socket_file
  MelissaData::DEFAULT_SOCKET_FILE
end