Class: Rascal::CLI::Clean
Instance Method Summary collapse
-
#initialize(thor, options, environment_name) ⇒ Clean
constructor
A new instance of Clean.
- #run ⇒ Object
Constructor Details
#initialize(thor, options, environment_name) ⇒ Clean
Returns a new instance of Clean.
6 7 8 9 10 11 12 13 14 |
# File 'lib/rascal/cli/clean.rb', line 6 def initialize(thor, , environment_name) @environment_name = if [:all] fail_with_error('Cannot give --all and an environment name!') if environment_name :all else environment_name end super(thor, ) end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 |
# File 'lib/rascal/cli/clean.rb', line 16 def run each_environment(@environment_name) do |environment| environment.clean(clean_volumes: [:volumes]) end end |