Method: Uinit::Type::Instance#check!

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

#check!(value, depth) ⇒ Object



28
29
30
31
32
# File 'lib/uinit/type/instance.rb', line 28

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

  type_error!("#{value.inspect} must be an instance of #{class_module}", depth)
end