class Moonshot::Commands::Create
Attributes
deploy[R]
version[R]
Public Instance Methods
execute()
click to toggle source
# File lib/moonshot/commands/create.rb, line 26 def execute controller.create if @deploy && @version.nil? controller.push elsif @deploy controller.deploy_version(@version) end end
parser()
click to toggle source
Calls superclass method
Moonshot::Commands::ParameterArguments#parser
# File lib/moonshot/commands/create.rb, line 13 def parser @deploy = true parser = super parser.on('-d', '--[no-]deploy', TrueClass, 'Choose if code should be deployed immediately after the stack is created') do |v| # rubocop:disable LineLength @deploy = v end parser.on('--version VERSION_NAME', 'Version for initial deployment. If unset, a new development build is created from the local directory') do |v| # rubocop:disable LineLength @version = v end end