Class: Builder::XmlMarkup

Inherits:
Object
  • Object
show all
Defined in:
lib/builder/xml_markup.rb

Instance Method Summary collapse

Instance Method Details

#array_mode(key = nil) {|_self| ... } ⇒ Object

Add this no-op

Yields:

  • (_self)

Yield Parameters:



26
27
28
# File 'lib/builder/xml_markup.rb', line 26

def array_mode(key = nil, &block)
  yield(self)
end

#cdata!(key, default_content_key = nil) ⇒ Object



21
22
23
# File 'lib/builder/xml_markup.rb', line 21

def cdata!(key, default_content_key = nil)
  single_argument_cdata!(key)
end

#new!Object



10
11
12
# File 'lib/builder/xml_markup.rb', line 10

def new!
  Builder::XmlMarkup.new
end

#root!(key, *attrs, &block) ⇒ Object

Rooted element only needed by XML



15
16
17
# File 'lib/builder/xml_markup.rb', line 15

def root!(key, *attrs, &block)
  tag!(key, *attrs, &block)
end

#serialization_method!Object



6
7
8
# File 'lib/builder/xml_markup.rb', line 6

def serialization_method!
  :to_xml
end

#single_argument_cdata!Object



19
# File 'lib/builder/xml_markup.rb', line 19

alias :single_argument_cdata! :cdata!