Class: Rascal::CLI::Update
Instance Method Summary collapse
-
#initialize(thor, options, environment_name) ⇒ Update
constructor
A new instance of Update.
- #run ⇒ Object
Constructor Details
#initialize(thor, options, environment_name) ⇒ Update
Returns a new instance of Update.
6 7 8 9 10 11 12 13 14 |
# File 'lib/rascal/cli/update.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 21 |
# File 'lib/rascal/cli/update.rb', line 16 def run images = [] each_environment(@environment_name) do |environment| images += environment.update(skip: images) end end |