Method: Webhookapp::Tunnel::Client#initialize

Defined in:
lib/webhookapp/tunnel/client.rb

#initialize(local_port, hook_id, client_id, username, password) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/webhookapp/tunnel/client.rb', line 8

def initialize(local_port, hook_id, client_id, username, password)
  raise ArgumentError, 'Unknown local port' unless local_port
  raise ArgumentError, 'Unknown hook' unless hook_id

  @connections = {}

  @local_port = local_port
  @hook_id = hook_id
  @client_id = client_id
  @username = username
  @password = password
  @details = nil
  @remote_port = nil
  @control = nil
end