Module: Tadpole::LocalTemplate::ClassMethods
- Defined in:
- lib/tadpole/local_template.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/tadpole/local_template.rb', line 4 def path @path end |
Instance Method Details
#inherited_paths ⇒ Object
6 |
# File 'lib/tadpole/local_template.rb', line 6 def inherited_paths; @inherited_paths ||= [] end |
#inherits(*templates) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tadpole/local_template.rb', line 8 def inherits(*templates) templates.each do |template| p = template.to_s[0,1] == '/' ? [template.to_s[1..-1]] : [path, template] mod = Tadpole.template(*p) include mod before_run_filters.push(*mod.before_run_filters) before_section_filters.push(*mod.before_section_filters) inherited_paths.unshift(*mod.template_paths) end end |
#template_paths ⇒ Object
5 |
# File 'lib/tadpole/local_template.rb', line 5 def template_paths; @template_paths ||= [] end |