Class: DNSimple::Commands::CreateTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/create_template.rb

Instance Method Summary collapse

Instance Method Details

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



4
5
6
7
8
9
10
11
# File 'lib/dnsimple/commands/create_template.rb', line 4

def execute(args, options={})
  name = args.shift
  short_name = args.shift
  description = args.shift unless args.empty?

  template = Template.create(name, short_name, description)
  puts "Created #{template.name} (short_name:#{template.short_name})"
end