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

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, options = {})
  Hash.to_xml hash.dup, options
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, options = {})
  XMLKey.create(key, options)
end