Class: ActionView::TemplateHandlers::ErubisHandler
- Inherits:
-
TemplateHandler
- Object
- TemplateHandler
- ActionView::TemplateHandlers::ErubisHandler
- Includes:
- Compilable, Erubis::Helpers::RailsHelper::TemplateConverter, Erubis::PreprocessingHelper
- Defined in:
- lib/erubis/helpers/rails_helper.rb,
lib/erubis/helpers/rails_helper.rb
Instance Method Summary collapse
-
#_preprocessing_context_object ⇒ Object
:nodoc:.
-
#cache_fragment(block, name = {}, options = nil) ⇒ Object
:nodoc:.
- #compile(template) ⇒ Object
-
#logger ⇒ Object
:nodoc:.
Methods included from Erubis::PreprocessingHelper
Methods included from Erubis::Helpers::RailsHelper::TemplateConverter
#_convert_template, #_create_preprocessor
Instance Method Details
#_preprocessing_context_object ⇒ Object
:nodoc:
156 157 158 |
# File 'lib/erubis/helpers/rails_helper.rb', line 156 def _preprocessing_context_object #:nodoc: return @view.controller.instance_variable_get('@template') end |
#cache_fragment(block, name = {}, options = nil) ⇒ Object
:nodoc:
160 161 162 163 164 165 |
# File 'lib/erubis/helpers/rails_helper.rb', line 160 def cache_fragment(block, name = {}, = nil) #:nodoc: @view.fragment_for(block, name, ) do #eval(ActionView::Base.erb_variable, block.binding) eval('_buf', block.binding) end end |
#compile(template) ⇒ Object
150 151 152 |
# File 'lib/erubis/helpers/rails_helper.rb', line 150 def compile(template) return _convert_template(template.source) # template.is_a?(ActionView::Template) end |
#logger ⇒ Object
:nodoc:
153 154 155 |
# File 'lib/erubis/helpers/rails_helper.rb', line 153 def logger #:nodoc: return @view.controller.logger end |