In the Ruby class, I overwrite the three methods, and in each method I basically do the same thing:
class ExampleClass
def confirmation_required?
is_allowed && super
end
def postpone_email_change?
is_allowed && super
end
def reconfirmation_required?
is_allowed && super
end
end
Is there a more compact syntax? How can I shorten the code?
source
share