Class: Gyoku::Array
- Inherits:
-
Object
- Object
- Gyoku::Array
- Defined in:
- lib/gyoku/array.rb
Constant Summary collapse
- NESTED_ELEMENT_NAME =
"element"
Class Method Summary collapse
-
.to_xml(array, key, escape_xml = true, attributes = {}, options = {}) ⇒ Object
Builds XML and prettifies it if
pretty_print
option is set totrue
.
Class Method Details
.to_xml(array, key, escape_xml = true, attributes = {}, options = {}) ⇒ Object
Builds XML and prettifies it if pretty_print
option is set to true
12 13 14 15 16 17 18 19 20 |
# File 'lib/gyoku/array.rb', line 12 def self.to_xml(array, key, escape_xml = true, attributes = {}, = {}) xml = build_xml(array, key, escape_xml, attributes, ) if [:pretty_print] && [:unwrap] Prettifier.prettify(xml, ) else xml end end |