Class: Twofishes::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_timeoutObject



5
6
7
# File 'lib/twofishes/configuration.rb', line 5

def connect_timeout
  @connect_timeout
end

#hostObject



5
6
7
# File 'lib/twofishes/configuration.rb', line 5

def host
  @host
end

#portObject



5
6
7
# File 'lib/twofishes/configuration.rb', line 5

def port
  @port
end

#retriesObject



5
6
7
# File 'lib/twofishes/configuration.rb', line 5

def retries
  @retries
end

#timeoutObject



5
6
7
# File 'lib/twofishes/configuration.rb', line 5

def timeout
  @timeout
end

Instance Method Details

#addressObject



15
16
17
# File 'lib/twofishes/configuration.rb', line 15

def address
  "#{host}:#{port}"
end