Class: Honeydew::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



13
14
15
16
17
18
19
20
# File 'lib/honeydew/honeydew.rb', line 13

def initialize
  @port = 7120
  @timeout = 2.seconds.to_i
  @server_timeout = 60.seconds.to_i

  @logger = Logger.new(STDERR)
  @logger.level = Logger::INFO
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



8
9
10
# File 'lib/honeydew/honeydew.rb', line 8

def logger
  @logger
end

#portObject

Returns the value of attribute port.



8
9
10
# File 'lib/honeydew/honeydew.rb', line 8

def port
  @port
end

#server_timeoutObject

Returns the value of attribute server_timeout.



8
9
10
# File 'lib/honeydew/honeydew.rb', line 8

def server_timeout
  @server_timeout
end

#timeoutObject

Returns the value of attribute timeout.



8
9
10
# File 'lib/honeydew/honeydew.rb', line 8

def timeout
  @timeout
end

Instance Method Details

#obtain_new_portObject



22
23
24
# File 'lib/honeydew/honeydew.rb', line 22

def obtain_new_port
  @port.tap { @port += 1 }
end