Class: XmlFu::Markup

Inherits:
Object
  • Object
show all
Defined in:
lib/xml-fu/markup.rb

Overview

Pseudo class for holding logic for creating the XmlMarkup object.

Class Method Summary collapse

Class Method Details

.new(options = {}) ⇒ Builder::XmlMarkup



8
9
10
11
12
13
14
15
16
17
# File 'lib/xml-fu/markup.rb', line 8

def self.new(options={})
  indent = (options.delete(:indent) || 0).to_i
  margin = (options.delete(:margin) || 0).to_i
  instruct = options.delete(:instruct) || false

  xml = Builder::XmlMarkup.new(:indent => indent, :margin => margin)
  xml.instruct! if instruct == true

  return xml
end