Sha256: 84a0f0d42f26a5636c8dbdade3ca0af62c9bac4bca994f107863127791efd236

Contents?: true

Size: 581 Bytes

Versions: 30

Compression:

Stored size: 581 Bytes

Contents

module DNSimple
  module Commands
    class AddTemplateRecord
      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

30 entries across 30 versions & 2 rubygems

Version Path
dnsimple-ruby-1.3.2 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.3.1 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.3.0 lib/dnsimple/commands/add_template_record.rb
sparqcode-dnsimple-ruby-1.2.6 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.6 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.5 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.4 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.3 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.2 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.1 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.2.0 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.1.1 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-1.0.0 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.9 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.8 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.7 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.6 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.5 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.4 lib/dnsimple/commands/add_template_record.rb
dnsimple-ruby-0.9.3 lib/dnsimple/commands/add_template_record.rb