Hey,
If you've used Rails, helpers in staticmatic work in the same way.
You don't need to create classes in this manner - any module code is
included into the methods available in the view.
If you have a large helper that requires a lot of code and passing
around data, include it as a class in lib/ and provide a module-based
helper to interface with it:
lib/big_class.rb:
class BigClass
...
def render(current_page)
...
end
end
helpers/big_helper.rb
module BigHelper
def print_link(title)
BigClass.new(title).render(current_page)
end
end
To be honest though, the simplest thing to do is break helpers down as
much as you can and separate them out into separate files based on
context and/or concern.
Hope that helps!
Steve