Sha256: c771d6b5697491b6b1f2e2affce25d1073fdbd24ff448628a644122292b61f63

Contents?: true

Size: 1.64 KB

Versions: 9

Compression:

Stored size: 1.64 KB

Contents

o:$YARD::CodeObjects::MethodObject:@current_file_has_commentsF:
@linei:@scope:
instance:@docstringIC:YARD::Docstring":@ref_tags[:@objectu:YARD::StubProxyLiquidView#render:
@summary0:	@all":@line_range0:
@tags[:@parameters[["
template0["local_assigns"nil:@namespaceu;LiquidView:@files[["5lib/mail_engine/liquid_view_patch/liquid_view.rbi:
@name:render:
@dynamicT:
@path"LiquidView#render:@visibility:public:@source_type:	ruby:@signature".def render(template, local_assigns = nil):@source"ndef render(template, local_assigns = nil)
  ### when I render text layout, it still set me html content type. so remove it.
  # @view.controller.headers["Content-Type"] ||= 'text/html; charset=utf-8'

  # Rails 2.2 Template has source, but not locals
  if template.respond_to?(:source) && !template.respond_to?(:locals)
    assigns = (@view.instance_variables - PROTECTED_INSTANCE_VARIABLES).inject({}) do |hash, ivar|
                hash[ivar[1..-1]] = @view.instance_variable_get(ivar)
                hash
              end
  else
    assigns = @view.assigns.reject{ |k,v| PROTECTED_ASSIGNS.include?(k) }
  end

  source = template.respond_to?(:source) ? template.source : template
  local_assigns = (template.respond_to?(:locals) ? template.locals : local_assigns) || {}

  if content_for_layout = @view.instance_variable_get("@content_for_layout")
    assigns['content_for_layout'] = content_for_layout
  end
  assigns.merge!(local_assigns.stringify_keys)

  liquid = Liquid::Template.parse(source)
  liquid.render(assigns, :filters => [@view.helpers], :registers => {:action_view => @view, :controller => @view.controller})
end:@explicitT;[

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mail_engine-0.1.15 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.14 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.13 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.12 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.11 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.10 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.9 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.8 .yardoc/objects/LiquidView/render_i.dat
mail_engine-0.1.7 .yardoc/objects/LiquidView/render_i.dat