lib/capcode/render/binary.rb in capcode-render-binary-0.1.0 vs lib/capcode/render/binary.rb in capcode-render-binary-0.2.0

- old
+ new

@@ -1,8 +1,13 @@ module Capcode module Helpers def render_binary( f, opts ) #:nodoc: - @response['Content-Type'] = opts[:content_type]||opts['Content-Type']||"binary/octet-stream" + @response['Content-Type'] = opts.delete(:content_type)||opts.delete('Content-Type')||"binary/octet-stream" + opts.each do |k, v| + k = k.to_s.split(/_/).map{|e| e.capitalize}.join("-") + @response[k] = v + end + self.send(f) end end end \ No newline at end of file