Sha256: 701c35eee8f9043424c1d17b239b1beb1d494342bb283ad015f1716a04ca636d

Contents?: true

Size: 398 Bytes

Versions: 7

Compression:

Stored size: 398 Bytes

Contents

require 'docile'

Cfer::Core::Resource.extend_resource "AWS::Route53::RecordSetGroup" do
  %w{a aaaa cname mx ns ptr soa spf srv txt}.each do |type|
    define_method type.to_sym do |name, records, options = {}|
      self[:Properties][:RecordSets] ||= []
      self[:Properties][:RecordSets] << options.merge(Type: type.upcase, Name: name, ResourceRecords: [ records ].flatten)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cfer-1.0.0 lib/cferext/aws/route53/record_dsl.rb
cfer-0.8.0 lib/cferext/aws/route53/record_dsl.rb
cfer-0.7.0 lib/cferext/aws/route53/record_dsl.rb
cfer-0.6.2 lib/cferext/aws/route53/record_dsl.rb
cfer-0.6.1 lib/cferext/aws/route53/record_dsl.rb
cfer-0.6.0 lib/cferext/aws/route53/record_dsl.rb
cfer-0.5.0 lib/cferext/aws/route53/record_dsl.rb