class Aws::Templates::Utils::Parametrized::Constraint::NotNil
Check if passed value is not nil
Example¶ ↑
class Piece include Aws::Templates::Utils::Parametrized parameter :param1, :constraint => not_nil end i = Piece.new(:param1 => 3) i.param1 # => 3 i = Piece.new i.param1 # throws ParameterValueInvalid
Public Class Methods
new()
click to toggle source
# File lib/aws/templates/utils/parametrized/constraint/not_nil.rb, line 24 def initialize self.if(Constraint::Condition.any) end
Protected Instance Methods
check(_, value, _)
click to toggle source
# File lib/aws/templates/utils/parametrized/constraint/not_nil.rb, line 30 def check(_, value, _) raise('required but was not found in input hash') if value.nil? end