Class: Twofishes::Configuration
- Inherits:
-
Object
- Object
- Twofishes::Configuration
- Defined in:
- lib/twofishes/configuration.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #address ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 |
# File 'lib/twofishes/configuration.rb', line 7 def initialize @host = '127.0.0.1' @port = 8080 @timeout = 3 @retries = 2 @connect_timeout = 0.5 end |
Instance Attribute Details
#connect_timeout ⇒ Object
5 6 7 |
# File 'lib/twofishes/configuration.rb', line 5 def connect_timeout @connect_timeout end |
#host ⇒ Object
5 6 7 |
# File 'lib/twofishes/configuration.rb', line 5 def host @host end |
#port ⇒ Object
5 6 7 |
# File 'lib/twofishes/configuration.rb', line 5 def port @port end |
#retries ⇒ Object
5 6 7 |
# File 'lib/twofishes/configuration.rb', line 5 def retries @retries end |
#timeout ⇒ Object
5 6 7 |
# File 'lib/twofishes/configuration.rb', line 5 def timeout @timeout end |
Instance Method Details
#address ⇒ Object
15 16 17 |
# File 'lib/twofishes/configuration.rb', line 15 def address "#{host}:#{port}" end |