A
Adrian
Hi
This maybe a pretty obvious question - but I decided to ask anyway.
I am trying to class a method defined within an included module from a
class level method as below.
Is there a better way to do this? (Assumming that the class level
method cannot be changed to a instance method.)
class Report
include FormatHelper
self.generate_report
...
my_date = self.format_date(...)
...
end
end
module FormatHelper
self.format_date(date)
...
end
end
Any help welcome
Cheers
Adrian
This maybe a pretty obvious question - but I decided to ask anyway.
I am trying to class a method defined within an included module from a
class level method as below.
Is there a better way to do this? (Assumming that the class level
method cannot be changed to a instance method.)
class Report
include FormatHelper
self.generate_report
...
my_date = self.format_date(...)
...
end
end
module FormatHelper
self.format_date(date)
...
end
end
Any help welcome
Cheers
Adrian