Sha256: 314ff92fad2efeced9f28260761fdf90663a969b97f11b208552e3f1e7982d0e

Contents?: true

Size: 801 Bytes

Versions: 5

Compression:

Stored size: 801 Bytes

Contents

# frozen_string_literal: true

module AwsCftTools
  # Represents a change in a changeset.
  class DeletionChange < Change
    attr_reader :resource

    ###
    #
    # @param resource
    #
    def initialize(resource)
      @resource = resource
    end

    ###
    # Return the action taken. For deletion, this is always +DELETE+.
    #
    # @return [String] +'DELETE'+ to indicate a deletion
    #
    def action
      'DELETE'
    end

    ###
    # Return the status of this change as a replacement. For deletion, this is always +nil+.
    #
    # @return [nil]
    #
    def replacement
      nil
    end

    ###
    # Return the scopes of the change. For deletions, this is always +Resource+.
    #
    # @return [String] +'Resource'+
    #
    def scopes
      'Resource'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aws-cft-tools-0.1.4 lib/aws_cft_tools/deletion_change.rb
aws-cft-tools-0.1.3 lib/aws_cft_tools/deletion_change.rb
aws-cft-tools-0.1.2 lib/aws_cft_tools/deletion_change.rb
aws-cft-tools-0.1.1 lib/aws_cft_tools/deletion_change.rb
aws-cft-tools-0.1.0 lib/aws_cft_tools/deletion_change.rb