Method: Uinit::Type::Const#check!

Defined in:
lib/uinit/type/const.rb

#check!(value, depth) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/uinit/type/const.rb', line 26

def check!(value, depth)
  return value if is?(value)

  type_error!(
    "#{value.inspect} must be equal to #{self.value.inspect}",
    depth
  )
end