Module: TemplateWrapper
- Defined in:
- lib/railtie.rb,
lib/template_wrapper.rb,
lib/template_wrapper/version.rb
Defined Under Namespace
Classes: Railtie
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
Class Method Details
.skip_wrap(template_path, type = :blank) ⇒ Object
27 28 29 |
# File 'lib/template_wrapper.rb', line 27 def self.skip_wrap(template_path, type=:blank ) @skip_templates.store(template_path.gsub("#{Rails.root}/", ''),type) end |
.wrap(path, content) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/template_wrapper.rb', line 31 def self.wrap(path,content) if @skip_templates.keys.include?(path) rendering = @skip_templates[path] || :blank html = encapsulate_template(path,content,rendering) else html = encapsulate_template(path,content) end @skip_templates = {} html end |