3 ms·
Indeed: def not_impl(reason = 'unknown reason') raise NotImplementedError.new reason end not_impl #=> NotImplementedError: unknown reason not_impl
by izietto 13y ago
Indeed:
def not_impl(reason = 'unknown reason')
raise NotImplementedError.new reason
end
not_impl #=> NotImplementedError: unknown reason
not_impl 'TODO' #=> NotImplementedError: TODO
You can even define a "..." method:
define_method("...") { raise NotImplementedError }
send "..." #=> NotImplementedError: NotImplementedError
But, as chromatic said, the point is the three dots operator feature