I recently discovered a cool trick for runtime type validation using pattern matching, it goes like this
class Person attr_accessor :name, :age
def initialize(name:, age:)
name => ::String
age => ::Numeric
@name = name
@age = age
end
endSrc: https://ruby.social/@aristotelesbr/110533722544270023?utm_so...