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}- BLACK_BG =
"\033[48;2;0;0;0m"- WHITE_BG =
"\033[48;2;255;255;255m"- BLACK_FG =
"\033[38;2;0;0;0m"- WHITE_FG =
"\033[38;2;255;255;255m"- RESET =
"\033[0m"
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.
14 15 16 |
# File 'lib/ruby_native/cli/preview.rb', line 14 def initialize(argv) @port = parse_port(argv) end |
Instance Method Details
#run ⇒ Object
18 19 20 21 |
# File 'lib/ruby_native/cli/preview.rb', line 18 def run check_cloudflared! start_tunnel end |