Module: Rusty::Helpers
- Included in:
- RuleSet
- Defined in:
- lib/rusty/helpers.rb
Overview
Helper support for Rusty.
Defined Under Namespace
Modules: Text
Instance Method Summary collapse
-
#helper(*mods, &block) ⇒ Object
set up a helper.
-
#helpers ⇒ Object
return all helpers.
Instance Method Details
#helper(*mods, &block) ⇒ Object
27 28 29 30 |
# File 'lib/rusty/helpers.rb', line 27 def helper(*mods, &block) helpers.concat mods helpers << Module.new.tap { |mod| mod.class_eval(&block) } if block end |
#helpers ⇒ Object
return all helpers
9 10 11 |
# File 'lib/rusty/helpers.rb', line 9 def helpers @helpers ||= [] end |