Reformatting a method options hash
Here, while it may look nice, the method clean_hash is not general enough to be valid across all Hashes. So adding a method such as clean_hash to all Hashes would only serve to increase the coupling which is bad. A second problem is that you are mutating your method argument which is almost never advisable.

The  solution is to define the clean method outside, perhaps as a part of your internal API object and call HHTParty.get(path, :query =&gt; clean(options)).parsed_response.

I would also define the clean method this way

def clean(opt)
  Hash[opt.collect{|k,v| [k,v.is_a? Date : v.strftime('%Y-%m-%d %H:%m:%S'):v.to_s ]}]
end