Class: DNSimple::Commands::RecordCreate
- Inherits:
-
Object
- Object
- DNSimple::Commands::RecordCreate
- Defined in:
- lib/dnsimple/commands/record_create.rb
Instance Method Summary collapse
Instance Method Details
#execute(args, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/dnsimple/commands/record_create.rb', line 4 def execute(args, = {}) name = args.shift record_name = args.shift record_type = args.shift content = args.shift ttl = args.shift domain = Domain.find(name) record = Record.create(domain, record_name, record_type, content, :ttl => ttl, :prio => [:prio]) puts "Created #{record.record_type} record for #{domain.name} (id:#{record.id})" end |