Module: Gyoku
- Defined in:
- lib/gyoku.rb,
lib/gyoku/hash.rb,
lib/gyoku/array.rb,
lib/gyoku/version.rb,
lib/gyoku/xml_key.rb,
lib/gyoku/xml_value.rb,
lib/gyoku/prettifier.rb
Defined Under Namespace
Modules: XMLKey, XMLValue Classes: Array, Hash, Prettifier
Constant Summary collapse
- VERSION =
'1.4.0'
Class Method Summary collapse
-
.xml(hash, options = {}) ⇒ Object
Translates a given
hash
withoptions
to XML. -
.xml_tag(key, options = {}) ⇒ Object
Converts a given Hash
key
withoptions
into an XML tag.
Class Method Details
.xml(hash, options = {}) ⇒ Object
Translates a given hash
with options
to XML.
12 13 14 |
# File 'lib/gyoku.rb', line 12 def self.xml(hash, = {}) Hash.to_xml hash.dup, end |
.xml_tag(key, options = {}) ⇒ Object
Converts a given Hash key
with options
into an XML tag.
7 8 9 |
# File 'lib/gyoku.rb', line 7 def self.xml_tag(key, = {}) XMLKey.create(key, ) end |