Sha256: 472defe6a0bd74a0f172805e5bba6d4bc1208546c064fa47a7e9e5f78998630b

Contents?: true

Size: 809 Bytes

Versions: 4

Compression:

Stored size: 809 Bytes

Contents

require 'forwardable'
require_relative '../resource'

module Convection
  module Model
    class Template
      class Resource
        ##
        # AWS::SNS::TopicPolicy
        ##
        class SNSTopicPolicy < Resource
          extend Forwardable

          type 'AWS::SNS::TopicPolicy'
          property :topics, 'Topics'
          attr_reader :document

          def_delegators :@document, :allow, :id, :version, :statement
          def_delegator :@document, :name, :policy_name

          def initialize(*args)
            super
            @document = Model::Mixin::Policy.new(:name => false, :template => @template)
          end

          def render
            super.tap do |r|
              document.render(r['Properties'])
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convection-0.2.5 lib/convection/model/template/resource/aws_sns_topic_policy.rb
convection-0.2.4 lib/convection/model/template/resource/aws_sns_topic_policy.rb
convection-0.2.3 lib/convection/model/template/resource/aws_sns_topic_policy.rb
convection-0.2.2 lib/convection/model/template/resource/aws_sns_topic_policy.rb