Sha256: f8def5560edea7f273020ee1136c521ebde7b119a7e0f4f274b45952520dcc8e

Contents?: true

Size: 655 Bytes

Versions: 25

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true

require_relative '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

25 entries across 25 versions & 1 rubygems

Version Path
cfndsl-1.7.2 lib/cfndsl/parameters.rb
cfndsl-1.6.0 lib/cfndsl/parameters.rb
cfndsl-1.5.0 lib/cfndsl/parameters.rb
cfndsl-1.4.0 lib/cfndsl/parameters.rb
cfndsl-1.3.9 lib/cfndsl/parameters.rb
cfndsl-1.3.8 lib/cfndsl/parameters.rb
cfndsl-1.3.7 lib/cfndsl/parameters.rb
cfndsl-1.3.6 lib/cfndsl/parameters.rb
cfndsl-1.3.5 lib/cfndsl/parameters.rb
cfndsl-1.3.4 lib/cfndsl/parameters.rb
cfndsl-1.3.3 lib/cfndsl/parameters.rb
cfndsl-1.3.2 lib/cfndsl/parameters.rb
cfndsl-1.3.1 lib/cfndsl/parameters.rb
cfndsl-1.3.0 lib/cfndsl/parameters.rb
cfndsl-1.2.0 lib/cfndsl/parameters.rb
cfndsl-1.1.1 lib/cfndsl/parameters.rb
cfndsl-1.1.0 lib/cfndsl/parameters.rb
cfndsl-1.0.6 lib/cfndsl/parameters.rb
cfndsl-1.0.5 lib/cfndsl/parameters.rb
cfndsl-1.0.4 lib/cfndsl/parameters.rb