my_all? method remarks
Closed this issue · 0 comments
Kyle-Law commented
-
From line 42 to line 45, the logic is that, if the parameter given is a Class (
if param.is_a?(Class)
), then true/false ifn.class <= param
) -
For line 47 & 48, the logic is that if the param passed is a Regexp (
if param.class == Regexp
), then check ifn.match?(param)
. There's no need to create a new Regexp instance.