Reputation: 14978
I am using Multiple code blocks of Mail::
and Gate::define()
in my code. I rather want to make it as functions and call them. What approach would be useful? Should I create helper classes?
Upvotes: 0
Views: 42
Reputation: 875
If You have some logic and you want to use this logic from many places, you must to encapsulate it, an in your situation it's not bad solution to create helper function or maybe helper class.
If You don't know how - here is very clear example to do it :
Upvotes: 1