Module: Tadpole::Template::ClassMethods
- Defined in:
- lib/tadpole/template.rb
Instance Attribute Summary collapse
-
#before_run_filters ⇒ Object
Returns the value of attribute before_run_filters.
-
#before_section_filters ⇒ Object
Returns the value of attribute before_section_filters.
-
#path ⇒ Object
Returns the value of attribute path.
-
#sections ⇒ Object
Returns the value of attribute sections.
-
#template_paths ⇒ Object
Returns the value of attribute template_paths.
Instance Method Summary collapse
Instance Attribute Details
#before_run_filters ⇒ Object
Returns the value of attribute before_run_filters.
24 25 26 |
# File 'lib/tadpole/template.rb', line 24 def before_run_filters @before_run_filters end |
#before_section_filters ⇒ Object
Returns the value of attribute before_section_filters.
24 25 26 |
# File 'lib/tadpole/template.rb', line 24 def before_section_filters @before_section_filters end |
#path ⇒ Object
Returns the value of attribute path.
23 24 25 |
# File 'lib/tadpole/template.rb', line 23 def path @path end |
#sections ⇒ Object
Returns the value of attribute sections.
23 24 25 |
# File 'lib/tadpole/template.rb', line 23 def sections @sections end |
#template_paths ⇒ Object
Returns the value of attribute template_paths.
23 24 25 |
# File 'lib/tadpole/template.rb', line 23 def template_paths @template_paths end |
Instance Method Details
#new(opts = {}, &block) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/tadpole/template.rb', line 30 def new(opts = {}, &block) obj = Object.new.extend(self) class << obj; extend ClassMethods include Filters::InstanceMethods end obj.instance_eval("def class; #{self} end", __FILE__, __LINE__) obj.send(:initialize, opts, &block) obj end |
#run(*args, &block) ⇒ Object
26 27 28 |
# File 'lib/tadpole/template.rb', line 26 def run(*args, &block) new(*args).run(&block) end |