Sha256: 1581f38763593452c660a1bba86c6119161ea3f0017984fce485c5f02eb54082

Contents?: true

Size: 376 Bytes

Versions: 7

Compression:

Stored size: 376 Bytes

Contents

module InlineTemplates
  class TemplateHandler
    def call(source)
      <<-EOF
        @output_buffer ||= ActionView::OutputBuffer.new
        context = ::InlineTemplates::RenderingContext.new(self, local_assigns, ::InlineTemplates::Builder.new)
        context.instance_exec do
          #{source.source}
        end
        @output_buffer.to_s
      EOF
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
inline_templates-1.0.0 lib/inline_templates/template_handler.rb
inline_templates-0.0.6 lib/inline_templates/template_handler.rb
inline_templates-0.0.5 lib/inline_templates/template_handler.rb
inline_templates-0.0.4 lib/inline_templates/template_handler.rb
inline_templates-0.0.3 lib/inline_templates/template_handler.rb
inline_templates-0.0.2 lib/inline_templates/template_handler.rb
inline_templates-0.0.1 lib/inline_templates/template_handler.rb