Sha256: aa3f044805308e5a5e22ba1c03ccf8cd60e8397e26300025f8de1a6ecffd32eb

Contents?: true

Size: 653 Bytes

Versions: 6

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

require 'cfndsl/jsonable'

module CfnDsl
  # Handles input parameter objects
  class ParameterDefinition < JSONable
    dsl_attr_setter :Type, :Default, :NoEcho, :AllowedValues, :AllowedPattern, :MaxLength,
                    :MinLength, :MaxValue, :MinValue, :Description, :ConstraintDescription

    def initialize
      @Type = :String
    end

    def String
      @Type = :String
    end

    def Number
      @Type = :Number
    end

    def CommaDelimitedList
      @Type = :CommaDelimitedList
    end

    def to_hash
      h = {}
      h[:Type] = @Type
      h[:Default] = @Default if @Default
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cfndsl-0.17.5 lib/cfndsl/parameters.rb
cfndsl-0.17.4 lib/cfndsl/parameters.rb
cfndsl-0.17.3 lib/cfndsl/parameters.rb
cfndsl-0.17.2 lib/cfndsl/parameters.rb
cfndsl-0.17.1 lib/cfndsl/parameters.rb
cfndsl-0.17.0 lib/cfndsl/parameters.rb