Class: DNSimple::Commands::RecordDelete

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/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/record_delete.rb', line 4

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

  domain = Domain.find(domain_name)
  record = Record.find(domain, id)
  record.delete

  puts "Deleted #{record.id} from #{domain.name}"
end