Class: Aws::Templates::Utils::Parametrized::Constraint::Condition::Equal

Inherits:
Aws::Templates::Utils::Parametrized::Constraint::Condition show all
Defined in:
lib/aws/templates/utils/parametrized/constraint/condition.rb

Overview

If value is equal to the condition then evaluate constraint

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Aws::Templates::Utils::Parametrized::Constraint::Condition

any, for, not_nil

Constructor Details

#initialize(expected) ⇒ Equal

Returns a new instance of Equal.



35
36
37
# File 'lib/aws/templates/utils/parametrized/constraint/condition.rb', line 35

def initialize(expected)
  @expected = expected
end

Instance Attribute Details

#expectedObject (readonly)

Returns the value of attribute expected.



33
34
35
# File 'lib/aws/templates/utils/parametrized/constraint/condition.rb', line 33

def expected
  @expected
end

Instance Method Details

#check(value, _) ⇒ Object



39
40
41
# File 'lib/aws/templates/utils/parametrized/constraint/condition.rb', line 39

def check(value, _)
  value == expected
end