If you include a Module
the methods will be accessible as instance methods. If you try to access the next_workday
method directly through the module, the method must be defined as a "class method" (with self.
).
Your MailHelper
should work if you use:
module MailHelper
include Workday
end
There is no need to define the next_workday
method in MailHelper
since it just delegates to Workday#next_workday
anyways. If you include your MailHelper
into a class you can then access the method with next_workday