Sha256: c492cfb5cedccd8fd662b247e655a051308121786298b1b947a9f8ced2856fc7

Contents?: true

Size: 526 Bytes

Versions: 11

Compression:

Stored size: 526 Bytes

Contents

module DNSimple
  module Commands
    class CreateRecord
      def execute(args, options={})
        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.name, record_name, record_type, content, :ttl => ttl, :prio => options[:prio])
        
        puts "Created #{record.record_type} record for #{domain.name} (id:#{record.id})"
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dnsimple-ruby-1.2.1 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-1.2.0 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-1.1.1 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-1.0.0 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.9 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.8 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.7 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.6 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.5 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.4 lib/dnsimple/commands/create_record.rb
dnsimple-ruby-0.9.3 lib/dnsimple/commands/create_record.rb