module Aws::Templates::Utils::Parametrized::Constraint::Dsl

Syntax sugar for constraints definition

It injects the methods as class-scope methods into mixing classes. The methods are factories to create particular type of constraint

Public Instance Methods

all_of(*constraints) click to toggle source

Parameter value should satisfy all specified constraints

alias for AllOf class

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 45
def all_of(*constraints)
  Parametrized::Constraint::AllOf.new(constraints)
end
any() click to toggle source

Match-all precondition

Any constraint with this precondition will process any value

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 21
def any
  Constraint::Condition.any
end
depends_on_value(selector) click to toggle source

Constraint depends on value

alias for DependsOnValue class

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 61
def depends_on_value(selector)
  Parametrized::Constraint::DependsOnValue.new(selector)
end
enum(*items) click to toggle source

Parameter value should be in enumeration

alias for Enum class

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 37
def enum(*items)
  Parametrized::Constraint::Enum.new(items.flatten)
end
matches(rex) click to toggle source

Value should match the regular experession

alias for Matches

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 77
def matches(rex)
  Parametrized::Constraint::Matches.new(rex)
end
not_nil() click to toggle source

Parameter shouldn't be nil

alias for NotNil class

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 29
def not_nil
  Parametrized::Constraint::NotNil.new
end
requires(*dependencies) click to toggle source

Requires presence of the parameters if condition is satisfied

alias for Requires class

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 53
def requires(*dependencies)
  Parametrized::Constraint::Requires.new(dependencies)
end
satisfies(description, &cond_block) click to toggle source

Constraint should satisfy the condition

alias for SatisfiesCondition class

# File lib/aws/templates/utils/parametrized/constraint/dsl.rb, line 69
def satisfies(description, &cond_block)
  Parametrized::Constraint::SatisfiesCondition.new(description, &cond_block)
end