In a Ruby Class I overwrite 3 methods. As you can see in each method I basically do the same:
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? Thanks
Aucun commentaire:
Enregistrer un commentaire