lib/capcode/render/binary.rb in capcode-render-binary-0.2.0 vs lib/capcode/render/binary.rb in capcode-render-binary-0.3.0
- old
+ new
@@ -5,9 +5,13 @@
opts.each do |k, v|
k = k.to_s.split(/_/).map{|e| e.capitalize}.join("-")
@response[k] = v
end
- self.send(f)
+ if self.respond_to?(f.to_sym)
+ self.send(f)
+ else
+ f
+ end
end
end
end
\ No newline at end of file