Class: Outset::Commands::ConfigCmd
- Inherits:
-
Object
- Object
- Outset::Commands::ConfigCmd
- Defined in:
- lib/outset/commands/config_cmd.rb
Instance Method Summary collapse
-
#initialize(action) ⇒ ConfigCmd
constructor
A new instance of ConfigCmd.
- #run ⇒ Object
Constructor Details
#initialize(action) ⇒ ConfigCmd
Returns a new instance of ConfigCmd.
6 7 8 |
# File 'lib/outset/commands/config_cmd.rb', line 6 def initialize(action) @action = action end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/outset/commands/config_cmd.rb', line 10 def run case @action when "show" then show when "init" then Config.init! when "edit" then edit when "path" then puts Config::CONFIG_FILE else UI.error("Unknown config action: '#{@action}'") UI.muted(" Available: show, init, edit, path") exit(1) end end |