Class: ClusterFuck::Commands::Create

Inherits:
Object
  • Object
show all
Includes:
AmicusEnvArgumentParser
Defined in:
lib/cluster-fuck/commands/create.rb

Instance Method Summary collapse

Methods included from AmicusEnvArgumentParser

included, #set_amicus_env_and_key_from_args

Instance Method Details

#run_command(args, options = {}) ⇒ Object

Raises:

  • (ConflictError)


9
10
11
12
13
14
15
# File 'lib/cluster-fuck/commands/create.rb', line 9

def run_command(args, options = {})
  set_amicus_env_and_key_from_args(args)
  obj = s3_object(key)
  raise ConflictError, "#{key} already exists!" if obj.exists?
  obj.write('')
  Edit.new.run_command(args)
end