savonrb/gyoku — pull request #36 by TAKAyukiatkwsk (2013-11-20 14:27:14+00:00)
Title: Enable setting any objects to :content! value

Setting any objects excluding String, Hash and Array to `:content!` value, and raise `NoMethodError` exception. Like this.

```ruby
Gyoku.xml(foo: {:'@bar' => 'a', :'@baz' => 'b', :content! => 10})
NoMethodError: undefined method `empty?' for 10:Fixnum
from /Users/takayuki_atkwsk/sandbox/vendor/bundle/ruby/1.9.1/bundler/gems/gyoku-b429d6b2a6d7/lib/gyoku/hash.rb:55:in `block in iterate_with_xml'
from /Users/takayuki_atkwsk/sandbox/vendor/bundle/ruby/1.9.1/bundler/gems/gyoku-b429d6b2a6d7/lib/gyoku/hash.rb:41:in `each'
from /Users/takayuki_atkwsk/sandbox/vendor/bundle/ruby/1.9.1/bundler/gems/gyoku-b429d6b2a6d7/lib/gyoku/hash.rb:41:in `iterate_with_xml'
from /Users/takayuki_atkwsk/sandbox/vendor/bundle/ruby/1.9.1/bundler/gems/gyoku-b429d6b2a6d7/lib/gyoku/hash.rb:12:in `to_xml'
from /Users/takayuki_atkwsk/sandbox/vendor/bundle/ruby/1.9.1/bundler/gems/gyoku-b429d6b2a6d7/lib/gyoku.rb:13:in `xml'
from (irb):2
from /Users/takayuki_atkwsk/.rbenv/versions/1.9.3-p448/bin/irb:12:in `

'
```

This pullreq enables setting any objects to `:content!` value.

```ruby
Gyoku.xml(foo: {:'@bar' => 'a', :'@baz' => 'b', :content! => 10})
=> "10"
Gyoku.xml(foo: {:'@bar' => 'a', :'@baz' => 'b', :content! => false})
=> "false"
```