Class: ActionView::TemplateHandlers::ErubisHandler

Inherits:
TemplateHandler
  • Object
show all
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

Methods included from Erubis::PreprocessingHelper

_P, _decode, _p

Methods included from Erubis::Helpers::RailsHelper::TemplateConverter

#_convert_template, #_create_preprocessor

Instance Method Details

#_preprocessing_context_objectObject

: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 = {}, options = nil) #:nodoc:
  @view.fragment_for(block, name, options) 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

#loggerObject

:nodoc:



153
154
155
# File 'lib/erubis/helpers/rails_helper.rb', line 153

def logger  #:nodoc:
  return @view.controller.logger
end