Sha256: 1eb3522e284dd6bb8c9ad32bce7439db02990bb18dced2e668fd04296d58b404

Contents?: true

Size: 537 Bytes

Versions: 120

Compression:

Stored size: 537 Bytes

Contents

# frozen_string_literal: true

module ActionView
  module Template::Handlers
    class Builder
      class_attribute :default_format, default: :xml

      def call(template, source)
        require_engine
        "xml = ::Builder::XmlMarkup.new(:indent => 2);" \
          "self.output_buffer = xml.target!;" +
          source +
          ";xml.target!;"
      end

      private
        def require_engine # :doc:
          @required ||= begin
            require "builder"
            true
          end
        end
    end
  end
end

Version data entries

120 entries across 114 versions & 10 rubygems

Version Path
actionview-7.0.8.6 lib/action_view/template/handlers/builder.rb
actionview-6.1.7.10 lib/action_view/template/handlers/builder.rb
actionview-6.1.7.9 lib/action_view/template/handlers/builder.rb
actionview-7.0.8.5 lib/action_view/template/handlers/builder.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionview-7.0.8.4/lib/action_view/template/handlers/builder.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionview-7.0.5.1/lib/action_view/template/handlers/builder.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionview-7.0.5.1/lib/action_view/template/handlers/builder.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionview-7.0.5.1/lib/action_view/template/handlers/builder.rb
actionview-7.0.8.4 lib/action_view/template/handlers/builder.rb
actionview-6.1.7.8 lib/action_view/template/handlers/builder.rb
actionview-7.0.8.1 lib/action_view/template/handlers/builder.rb
actionview-6.1.7.7 lib/action_view/template/handlers/builder.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionview-6.1.6.1/lib/action_view/template/handlers/builder.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionview-7.0.2.3/lib/action_view/template/handlers/builder.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionview-7.0.3.1/lib/action_view/template/handlers/builder.rb
actionview-7.0.8 lib/action_view/template/handlers/builder.rb
actionview-7.0.7.2 lib/action_view/template/handlers/builder.rb
actionview-6.1.7.6 lib/action_view/template/handlers/builder.rb
actionview-7.0.7.1 lib/action_view/template/handlers/builder.rb
actionview-6.1.7.5 lib/action_view/template/handlers/builder.rb