Sha256: 2dc0b005f2951ebdd671e167c67c9b2470b7aa2bfdb5cc1cfb898c298c205b31

Contents?: true

Size: 586 Bytes

Versions: 10

Compression:

Stored size: 586 Bytes

Contents

module DNSimple
  module Commands
    class TemplateRecordCreate
      def execute(args, options = {})
        short_name = args.shift
        record_name = args.shift
        record_type = args.shift
        content = args.shift
        ttl = args.shift

        template = Template.find(short_name)
        record = TemplateRecord.create(template.short_name, record_name, record_type, content, :ttl => ttl, :prio => options[:prio])
        
        puts "Created #{record.record_type} with content '#{record.content}' record for template #{template.name}"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dnsimple-ruby-1.7.1 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.7.0 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.6.0 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.5.5 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.5.4 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.5.3 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.5.2 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.5.1 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.4.1 lib/dnsimple/commands/template_record_create.rb
dnsimple-ruby-1.4.0 lib/dnsimple/commands/template_record_create.rb