Class: Plasma::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(socket_path, options = nil) ⇒ Client

Returns a new instance of Client.



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/plasma/client.rb', line 22

def initialize(socket_path, options=nil)
  socket_path = socket_path.to_path if socket_path.respond_to?(:to_path)
  if options
    options_raw = options
    options = ClientOptions.new
    options_raw.each do |key, value|
      setter = "#{key}="
      options.__send__(setter, value) if options.respond_to?(setter)
    end
  end
  initialize_raw(socket_path, options)
end