Sha256: 5b8bd8508fd1ad544214ef3e6ab27fe09e311e0720f7db1f5e44b10ae63c6c86

Contents?: true

Size: 566 Bytes

Versions: 20

Compression:

Stored size: 566 Bytes

Contents

module ActionView
  module Template::Handlers
    class Builder
      # Default format used by Builder.
      class_attribute :default_format
      self.default_format = :xml

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

      private

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
actionview-5.1.7 lib/action_view/template/handlers/builder.rb
actionview-5.1.7.rc1 lib/action_view/template/handlers/builder.rb
actionview-5.1.6.2 lib/action_view/template/handlers/builder.rb
actionview-5.1.6.1 lib/action_view/template/handlers/builder.rb
actionview-5.1.6 lib/action_view/template/handlers/builder.rb
actionview-5.1.5 lib/action_view/template/handlers/builder.rb
actionview-5.1.5.rc1 lib/action_view/template/handlers/builder.rb
actionview-5.1.4 lib/action_view/template/handlers/builder.rb
actionview-5.1.4.rc1 lib/action_view/template/handlers/builder.rb
actionview-5.1.3 lib/action_view/template/handlers/builder.rb
actionview-5.1.3.rc3 lib/action_view/template/handlers/builder.rb
actionview-5.1.3.rc2 lib/action_view/template/handlers/builder.rb
actionview-5.1.3.rc1 lib/action_view/template/handlers/builder.rb
actionview-5.1.2 lib/action_view/template/handlers/builder.rb
actionview-5.1.2.rc1 lib/action_view/template/handlers/builder.rb
actionview-5.1.1 lib/action_view/template/handlers/builder.rb
actionview-5.1.0 lib/action_view/template/handlers/builder.rb
actionview-5.1.0.rc2 lib/action_view/template/handlers/builder.rb
actionview-5.1.0.rc1 lib/action_view/template/handlers/builder.rb
actionview-5.1.0.beta1 lib/action_view/template/handlers/builder.rb