<commit_before>Gyoku [![Build Status](https://secure.travis-ci.org/rubiii/gyoku.png)](http://travis-ci.org/rubiii/gyoku)
=====

##### Translates Ruby Hashes to XML

Gyoku is available through [Rubygems](http://rubygems.org/gems/gyoku) and can
be installed via:

```
$ gem install gyoku
```

Gyoku is based on a few conventions.

``` ruby
Gyoku.xml(:find_user => { :id => 123, "v1:Key" => "api" })
# => "<findUser><id>123</id><v1:Key>api</v1:Key></findUser>"
```


Hash keys
---------

Hash key Symbols are converted to lowerCamelCase Strings.

``` ruby
Gyoku.xml(:lower_camel_case => "key")
# => "<lowerCamelCase>key</lowerCamelCase>"
```

You can change the default conversion formula to :camelcase, :upcase or :none.

``` ruby
Gyoku.xml(:camel_case => "key", :key_converter => :camelcase)
# => "<CamelCase>key</CamelCase>"
```

Hash key Strings are not converted and may contain namespaces.
<commit_msg>fix key_converter example in docs<commit_after>Gyoku [![Build Status](https://secure.travis-ci.org/rubiii/gyoku.png)](http://travis-ci.org/rubiii/gyoku)
=====

##### Translates Ruby Hashes to XML

Gyoku is available through [Rubygems](http://rubygems.org/gems/gyoku) and can
be installed via:

```
$ gem install gyoku
```

Gyoku is based on a few conventions.

``` ruby
Gyoku.xml(:find_user => { :id => 123, "v1:Key" => "api" })
# => "<findUser><id>123</id><v1:Key>api</v1:Key></findUser>"
```


Hash keys
---------

Hash key Symbols are converted to lowerCamelCase Strings.

``` ruby
Gyoku.xml(:lower_camel_case => "key")
# => "<lowerCamelCase>key</lowerCamelCase>"
```

You can change the default conversion formula to :camelcase, :upcase or :none. Note that you need to pass the converter as a separate hash of options

``` ruby
Gyoku.xml({:camel_case => "key"}, :key_converter => :camelcase)
# => "<CamelCase>key</CamelCase>"
```

Hash key Strings are not converted and may contain namespaces.

{'fraction_non_alphanumeric': 0.18286915396741987, 'fraction_numerical': 0.009458749343142408, 'mean_word_length': 4.787234042553192, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1605755', 'n_tokens_mistral': 723, 'n_tokens_neox': 664, 'n_words': 172}