Class: Redirectly::Command
- Inherits:
-
MisterBin::Command
- Object
- MisterBin::Command
- Redirectly::Command
- Includes:
- Colsole
- Defined in:
- lib/redirectly/command.rb
Instance Attribute Summary collapse
-
#config_path ⇒ Object
readonly
Returns the value of attribute config_path.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
Instance Attribute Details
#config_path ⇒ Object (readonly)
Returns the value of attribute config_path.
23 24 25 |
# File 'lib/redirectly/command.rb', line 23 def config_path @config_path end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
23 24 25 |
# File 'lib/redirectly/command.rb', line 23 def port @port end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 |
# File 'lib/redirectly/command.rb', line 25 def run @port = args['--port'].to_i @config_path = args['CONFIG'] || 'redirects.ini' args['--init'] ? init_file : start_server end |