Class: TurnoutProxy::HostChooser
- Inherits:
-
Object
- Object
- TurnoutProxy::HostChooser
- Defined in:
- lib/turnout_proxy/host_chooser.rb
Instance Method Summary collapse
-
#initialize(connection, options = {}) ⇒ HostChooser
constructor
A new instance of HostChooser.
- #on_data(data) ⇒ Object
Constructor Details
#initialize(connection, options = {}) ⇒ HostChooser
Returns a new instance of HostChooser.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/turnout_proxy/host_chooser.rb', line 4 def initialize(connection, = {}) @connection = connection @file_checker = .fetch(:file_checker) { File } @default = validate_host([:default]) @alternate = validate_host([:alternate]) @lock_file = [:lock_file] choose_destination_server! end |
Instance Method Details
#on_data(data) ⇒ Object
16 17 18 |
# File 'lib/turnout_proxy/host_chooser.rb', line 16 def on_data(data) data end |