Class: Honeydew::Configuration
- Inherits:
-
Object
- Object
- Honeydew::Configuration
- Defined in:
- lib/honeydew/honeydew.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#port ⇒ Object
Returns the value of attribute port.
-
#server_timeout ⇒ Object
Returns the value of attribute server_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #obtain_new_port ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/honeydew/honeydew.rb', line 8 def logger @logger end |
#port ⇒ Object
Returns the value of attribute port.
8 9 10 |
# File 'lib/honeydew/honeydew.rb', line 8 def port @port end |
#server_timeout ⇒ Object
Returns the value of attribute server_timeout.
8 9 10 |
# File 'lib/honeydew/honeydew.rb', line 8 def server_timeout @server_timeout end |
#timeout ⇒ Object
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_port ⇒ Object
22 23 24 |
# File 'lib/honeydew/honeydew.rb', line 22 def obtain_new_port @port.tap { @port += 1 } end |