meganemura/ruby-dmm — pull request #17 by joker1007 (2014-08-09 11:03:46+00:00)
Title: Add encode_options to DMM::Client

`encode_params!` failed and cannot get response,
if keyword has character which is undefined by EUC-JP.

this commit provide a way of avoiding.

example:

```ruby
@client = DMM.new(
api_id: config["api_id"],
affiliate_id: config["affiliate_id"],
result_only: true,
encode_options: {:invalid => :replace, :undef => :replace, :replace => " "}
)
```
(convert irregular character to whitespace.)

refs. http://rurema.clear-code.com/2.1.0/method/String/i/encode.html