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-6.0.5.1 lib/action_view/template/handlers/builder.rb
actionview-6.0.5 lib/action_view/template/handlers/builder.rb
actionview-6.1.6 lib/action_view/template/handlers/builder.rb
actionview-7.0.3 lib/action_view/template/handlers/builder.rb
actionview-7.0.2.4 lib/action_view/template/handlers/builder.rb
actionview-6.1.5.1 lib/action_view/template/handlers/builder.rb
actionview-6.0.4.8 lib/action_view/template/handlers/builder.rb
actionview-6.1.5 lib/action_view/template/handlers/builder.rb
actionview-7.0.2.3 lib/action_view/template/handlers/builder.rb
actionview-6.1.4.7 lib/action_view/template/handlers/builder.rb
actionview-6.0.4.7 lib/action_view/template/handlers/builder.rb
actionview-7.0.2.2 lib/action_view/template/handlers/builder.rb
actionview-6.1.4.6 lib/action_view/template/handlers/builder.rb
actionview-6.0.4.6 lib/action_view/template/handlers/builder.rb
actionview-6.0.4.5 lib/action_view/template/handlers/builder.rb
actionview-6.1.4.5 lib/action_view/template/handlers/builder.rb
actionview-7.0.2.1 lib/action_view/template/handlers/builder.rb
actionview-7.0.2 lib/action_view/template/handlers/builder.rb
actionview-7.0.1 lib/action_view/template/handlers/builder.rb
actionview-7.0.0 lib/action_view/template/handlers/builder.rb