Class: RubyNative::CLI::Preview
- Inherits:
-
Object
- Object
- RubyNative::CLI::Preview
- Defined in:
- lib/ruby_native/cli/preview.rb
Constant Summary collapse
- TUNNEL_URL_PATTERN =
%r{https://[a-z0-9-]+\.trycloudflare\.com}- CONFIG_PATH =
"/native/config.json"- TUNNEL_READY_TIMEOUT =
60- TUNNEL_POLL_INTERVAL =
1- PUBLIC_NAMESERVERS =
["1.1.1.1", "8.8.8.8"].freeze
Instance Method Summary collapse
-
#initialize(argv) ⇒ Preview
constructor
A new instance of Preview.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Preview
Returns a new instance of Preview.
15 16 17 |
# File 'lib/ruby_native/cli/preview.rb', line 15 def initialize(argv) @port = parse_port(argv) end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 |
# File 'lib/ruby_native/cli/preview.rb', line 19 def run check_cloudflared! check_local_server! start_tunnel end |