Class: Webtask::CLI
Constant Summary collapse
- DEFAULT_PORT =
4567.freeze
- DEFAULT_BIND =
"127.0.0.1".freeze
Instance Attribute Summary collapse
-
#bind ⇒ Object
Returns the value of attribute bind.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #show_help ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
13 14 15 16 |
# File 'lib/webtask/cli.rb', line 13 def initialize @port = DEFAULT_PORT @bind = DEFAULT_BIND end |
Instance Attribute Details
#bind ⇒ Object
Returns the value of attribute bind.
11 12 13 |
# File 'lib/webtask/cli.rb', line 11 def bind @bind end |
#port ⇒ Object
Returns the value of attribute port.
10 11 12 |
# File 'lib/webtask/cli.rb', line 10 def port @port end |
Instance Method Details
#show_help ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/webtask/cli.rb', line 18 def show_help puts <<~HELP_TEXT webtask – A web GUI for your Rake tasks Options: -b bind to a different address (default: #{DEFAULT_BIND}) -p bind to a different port (default: #{DEFAULT_PORT}) HELP_TEXT exit end |