Class: ReverseTunnel::CLI::Client
Instance Attribute Summary
Attributes inherited from Base
#arguments
Instance Method Summary
collapse
configure, #instance, #method_missing, #parse_host_port, #parse_host_port_range, #server=
Methods inherited from Base
#initialize, #options
Instance Method Details
#api=(api) ⇒ Object
107
108
109
|
# File 'lib/reverse-tunnel/cli.rb', line 107
def api=(api)
self.api_host, self.api_port = parse_host_port(api) if api
end
|
111
112
113
114
115
|
# File 'lib/reverse-tunnel/cli.rb', line 111
def configure(object = self)
super
self.token = token
instance
end
|
#parser ⇒ Object
95
96
97
98
99
100
101
|
# File 'lib/reverse-tunnel/cli.rb', line 95
def parser
@parser ||= Trollop::Parser.new do
opt :server, "Host and port of ReverseTunnel server", :type => :string
opt :api, "Host and port of status HTTP api", :type => :string
opt :"local-port", "Port to forward incoming connection", :default => 22
end
end
|
#token ⇒ Object
103
104
105
|
# File 'lib/reverse-tunnel/cli.rb', line 103
def token
arguments.first
end
|