Open denisdefreyne opened 6 years ago
Helpers are currently defined as modules that can be included:
module MyHelper def something # … end end use_helper MyHelper
This approach has some problems:
While it’s possible to work around these limitations (e.g. like this: https://gist.github.com/ddfreyne/b4c9df905a2bb927fd888d64183fda7f), it would be nice to have a built-in way to define helpers in Nanoc that avoids these issues. For example:
class MyHelper < Nanoc::Helper memoized def something # … end private def secret_method_omg # … end end use_helper MyHelper
Helpers are currently defined as modules that can be included:
This approach has some problems:
While it’s possible to work around these limitations (e.g. like this: https://gist.github.com/ddfreyne/b4c9df905a2bb927fd888d64183fda7f), it would be nice to have a built-in way to define helpers in Nanoc that avoids these issues. For example: