"hello".empty? # false [].empty? # true class Object def method_missing(method, **args, &block) super rescue NoMethodError => e if method =~ /not_(.*)/ return !send($1, **args, &block) end raise end end "hello".not_empty? # true [].not_empty? # false
https://media.hachyderm.io/media_attachments/files/110/625/113/294/611/272/original/16aeb5a1bd02af5d.png