Class: Array
- Defined in:
- lib/base/helpers/support.xml.rb,
lib/base/helpers/support.rb
Overview
— Array —
Instance Method Summary collapse
-
#_stringify_keys ⇒ Object
Stringifies keys on all the hash items.
-
#_symbolize_keys ⇒ Object
Stringifies keys on all the hash items.
-
#_to_xml(opts = {}) ⇒ String
Returns an XML-representation if the array object.
Instance Method Details
#_stringify_keys ⇒ Object
Stringifies keys on all the hash items.
165 166 167 168 169 |
# File 'lib/base/helpers/support.rb', line 165 def _stringify_keys map do |item| item.respond_to?(:_stringify_keys) ? item._stringify_keys : item end end |
#_symbolize_keys ⇒ Object
Stringifies keys on all the hash items.
157 158 159 160 161 |
# File 'lib/base/helpers/support.rb', line 157 def _symbolize_keys map do |item| item.respond_to?(:_symbolize_keys) ? item._symbolize_keys : item end end |
#_to_xml(opts = {}) ⇒ String
Returns an XML-representation if the array object.
145 146 147 148 149 |
# File 'lib/base/helpers/support.xml.rb', line 145 def _to_xml(opts={}) opts = _xml_get_opts(opts) tag = opts.delete(:tag) || 'item' { tag => self }._to_xml(opts) end |