I have something like this:
case method
when :get
HTTParty.get(configuration.endpoint)
when :post
HTTParty.post(configuration.endpoint)
when :put
HTTParty.put(configuration.endpoint)
end
How to do this?
HTTParty.{method}(configuration.endpoint)