Sha256: 9c200d9ea243ccd15bc0fd9b537f1db446dd159069573a46e3baaf0fe3a2e3b6

Contents?: true

Size: 548 Bytes

Versions: 161

Compression:

Stored size: 548 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

      protected

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

Version data entries

161 entries across 156 versions & 13 rubygems

Version Path
actionview-4.1.14.1 lib/action_view/template/handlers/builder.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/actionview-4.2.4/lib/action_view/template/handlers/builder.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/actionview-4.1.13/lib/action_view/template/handlers/builder.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/actionview-4.2.4/lib/action_view/template/handlers/builder.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/actionview-4.1.13/lib/action_view/template/handlers/builder.rb
actionview-5.0.0.beta1 lib/action_view/template/handlers/builder.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/actionview-4.1.13/lib/action_view/template/handlers/builder.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/actionview-4.2.4/lib/action_view/template/handlers/builder.rb
actionview-4.1.14 lib/action_view/template/handlers/builder.rb
actionview-4.2.5 lib/action_view/template/handlers/builder.rb
actionview-4.2.5.rc2 lib/action_view/template/handlers/builder.rb
actionview-4.1.14.rc2 lib/action_view/template/handlers/builder.rb
actionview-4.2.5.rc1 lib/action_view/template/handlers/builder.rb
actionview-4.1.14.rc1 lib/action_view/template/handlers/builder.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/actionview-4.2.4/lib/action_view/template/handlers/builder.rb
actionview-4.2.4 lib/action_view/template/handlers/builder.rb
actionview-4.1.13 lib/action_view/template/handlers/builder.rb
actionview-4.2.4.rc1 lib/action_view/template/handlers/builder.rb
actionview-4.1.13.rc1 lib/action_view/template/handlers/builder.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/actionview-4.2.3/lib/action_view/template/handlers/builder.rb