Class: Zas::ServiceConfiguration

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

Overview

Struct used to hold configuration information for the service

host - The host to listen to requests on. May be “*” or an IP address. port - The port number to listen to requests on. name - The name of the service for logging.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ServiceConfiguration

Returns a new instance of ServiceConfiguration.



8
9
10
11
12
# File 'lib/zas/service_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/service_configuration.rb', line 7

def host
  @host
end

#loggerObject

Returns the value of attribute logger

Returns:

  • (Object)

    the current value of logger



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

def logger
  @logger
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/zas/service_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/service_configuration.rb', line 7

def port
  @port
end