Class: GAVerify::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



8
9
10
11
12
13
14
15
# File 'lib/ga_verify/client.rb', line 8

def initialize options={}
  options[:socket] ||= GAVerify::Paths.default_socket 
  socket    = Thrift::UNIXSocket.new(options[:socket])
  transport = Thrift::FramedTransport.new(socket)
  protocol  = Thrift::BinaryProtocol.new(transport)
  @client   = GAVerify::Verifier::Client.new(protocol)
  transport.open
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



17
18
19
# File 'lib/ga_verify/client.rb', line 17

def method_missing *args
  @client.send *args
end