Method: Builder::XmlBase#initialize

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/lib/builder/xmlbase.rb

#initialize(indent = 0, initial = 0, encoding = 'utf-8') ⇒ XmlBase

Create an XML markup builder.

out

Object receiving the markup. out must respond to <<.

indent

Number of spaces used for indentation (0 implies no indentation and no line breaks).

initial

Level of initial indentation.

encoding

When encoding and $KCODE are set to ‘utf-8’ characters aren’t converted to character entities in the output stream.



29
30
31
32
33
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/lib/builder/xmlbase.rb', line 29

def initialize(indent=0, initial=0, encoding='utf-8')
  @indent = indent
  @level  = initial
  @encoding = encoding.downcase
end