Method: Ngrok::Tunnel.init
- Defined in:
- lib/ngrok/tunnel.rb
.init(params = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/ngrok/tunnel.rb', line 15 def init(params = {}) # map old key 'port' to 'addr' to maintain backwards compatibility with versions 2.0.21 and earlier params[:addr] = params.delete(:port) if params.key?(:port) @params = {addr: 3001, timeout: 10, config: '/dev/null'}.merge(params) @status = :stopped unless @status end |