Module: Tap::Generator::Helpers
- Included in:
- Base
- Defined in:
- lib/tap/generator/helpers.rb
Instance Attribute Summary collapse
-
#helper_registry ⇒ Object
readonly
Returns the value of attribute helper_registry.
Instance Method Summary collapse
Instance Attribute Details
#helper_registry ⇒ Object (readonly)
Returns the value of attribute helper_registry.
4 5 6 |
# File 'lib/tap/generator/helpers.rb', line 4 def helper_registry @helper_registry end |
Instance Method Details
#cache_helpers(on = true) ⇒ Object
18 19 20 21 |
# File 'lib/tap/generator/helpers.rb', line 18 def cache_helpers(on=true) @helpers = nil @helpers = self.helpers if on end |
#helpers ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tap/generator/helpers.rb', line 6 def helpers return @helpers if @helpers helpers = [] ancestors.each do |ancestor| next unless ancestor.kind_of?(Helpers) helpers.concat ancestor.helper_registry end helpers end |