Skip to content

Commit

Permalink
Merge 6371ceb into e3b7d06
Browse files Browse the repository at this point in the history
  • Loading branch information
mahemoff committed Dec 24, 2015
2 parents e3b7d06 + 6371ceb commit 932bd34
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ Gyoku.xml("XML" => "key")
* These conventions are also applied to the return value of objects responding to :call
* All other objects are converted to Strings using :to_s

## Array values

Array items are by default wrapped with the containiner tag, which may be unexpected.

``` ruby
> Gyoku.xml({languages: [{language: 'ruby'},{language: 'java'}]})
# => "<languages><language>ruby</language></languages><languages><language>java</language></languages>"
```

You can set the `unwrap` option to remove this behavior.

``` ruby
> Gyoku.xml({languages: [{language: 'ruby'},{language: 'java'}]}, { unwrap: true})
# => "<languages><language>ruby</language><language>java</language></languages>"
```

## Special characters

Expand Down

0 comments on commit 932bd34

Please sign in to comment.