Method: CrowdFlower::Connection#method_missing
- Defined in:
- lib/crowdflower/base.rb
#method_missing(method_id, *args) ⇒ Object
get, post, put and delete methods
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/crowdflower/base.rb', line 67 def method_missing(method_id, *args) if [:get, :post, :put, :delete].include?(method_id) path, = *args ||= {} [:query] = (default_params.merge([:query] || {})) [:headers] = (self.class.[:headers].merge([:headers] || {})) CrowdFlower.request_hook.call(method_id, path, ) do self.class.send(method_id, url(path), ) end else super end end |