class method self.new

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.new(options={})

Create an XML markup builder. Parameters are specified by an option hash.

:target=>target_object

Object receiving the markup. out must respond to the << operator. The default is a plain string target.

:indent=>indentation

Number of spaces used for indentation. The default is no indentation and no line breaks.

:margin=>initial_indentation_level

Amount of initial indentation (specified in levels, not spaces).

:escape_attrs=><b>OBSOLETE</em>

The :escape_attrs option is no longer supported by builder (and will be quietly ignored). String attribute values are now automatically escaped. If you need unescaped attribute values (perhaps you are using entities in the attribute values), then give the value as a Symbol. This allows much finer control over escaping attribute values.

Parameters

options opt = {}
Source
# File activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb, line 185
    def initialize(options={})
      indent = options[:indent] || 0
      margin = options[:margin] || 0
      super(indent, margin)
      @target = options[:target] || ""
    end

Defined in activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb line 185 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Builder::XmlMarkup

Type at least 2 characters to search.

↑↓ navigate · open · esc close