Class: Texico::CLI::Command::Clean
- Defined in:
- lib/texico/cli/command/clean.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
inherited, #initialize, #load_config, match, priority, select
Constructor Details
This class inherits a constructor from Texico::CLI::Command::Base
Class Method Details
.match?(command) ⇒ Boolean
27 28 29 |
# File 'lib/texico/cli/command/clean.rb', line 27 def match?(command) command == 'clean' end |
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/texico/cli/command/clean.rb', line 7 def run config = load_config build_dir = config[:build] if remove(build_dir) || remove(Build::SHADOW_BUILD_DIR) prompt.say "#{ICON} Removing old build files", color: :bold else prompt.say "#{ICON} Everything is already clean", color: :bold return end end |