Class: DNSimple::Commands::TemplateRecordDelete

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/template_record_delete.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/template_record_delete.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