Class: Zas::ClientConfiguration

Inherits:
Struct
  • Object
show all
Defined in:
lib/zas/client_configuration.rb

Overview

Struct used to configure the Zas::Client.

host - The IP address of the service. Defaults to 127.0.0.1 port - The port number for the service. name - The name of the client for logging.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ClientConfiguration

Returns a new instance of ClientConfiguration.



8
9
10
11
12
# File 'lib/zas/client_configuration.rb', line 8

def initialize(attributes={})
  attributes.each do |k, v|
    self[k] = v
  end
end

Instance Attribute Details

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



7
8
9
# File 'lib/zas/client_configuration.rb', line 7

def host
  @host
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/zas/client_configuration.rb', line 7

def name
  @name
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



7
8
9
# File 'lib/zas/client_configuration.rb', line 7

def port
  @port
end