Class: DNSimple::Commands::DeleteTemplateRecord

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

Instance Method Summary collapse

Instance Method Details

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



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

def execute(args, options={})
  short_name = args.shift
  id = args.shift

  template = Template.find(short_name)
  record = TemplateRecord.find(template.short_name, id)
  record.delete

  puts "Deleted #{record.id} from template #{short_name}"
end