class Deis::Commands::Enable

Public Instance Methods

run() click to toggle source
# File lib/deis/commands/enable.rb, line 6
def run
  status "Enabling App: #{app}"
  get_units!
  if units.any? { |_, v| v > 0 }
    status "App Already enabled!"
    return
  end
  scale app, units.keys.each_with_object({}) { |k, h| h[k] = 1 }
  status "App enabled!"
end