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.



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

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.



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

def logger
  @logger
end

#portObject

Returns the value of attribute port.



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

def port
  @port
end

#server_timeoutObject

Returns the value of attribute server_timeout.



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

def server_timeout
  @server_timeout
end

#timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

Instance Method Details

#obtain_new_portObject



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

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