Sha256: 48a0c491d1277f7e3be260ca87efcd5b45ea0915d68b4931828c455cc95aeb82

Contents?: true

Size: 305 Bytes

Versions: 7

Compression:

Stored size: 305 Bytes

Contents

# frozen_string_literal: true
module Arbre
  module Rails
    class TemplateHandler
      def call(template, source = nil)
        source = template.source unless source

        <<-END
        Arbre::Context.new(assigns, self) {
          #{source}
        }.to_s
        END
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arbre-2.2.0 lib/arbre/rails/template_handler.rb
arbre-2.1.0 lib/arbre/rails/template_handler.rb
arbre-2.0.2 lib/arbre/rails/template_handler.rb
arbre-2.0.1 lib/arbre/rails/template_handler.rb
arbre-2.0.0 lib/arbre/rails/template_handler.rb
arbre-1.7.0 lib/arbre/rails/template_handler.rb
arbre-1.6.0 lib/arbre/rails/template_handler.rb