module Traitify::Request
Public Instance Methods
method_missing(meth, *args, &block)
click to toggle source
Calls superclass method
# File lib/traitify/request.rb, line 3 def method_missing(meth, *args, &block) if [:get, :post, :put, :delete].include? meth request(meth, *args) else super end end
request(method, path, options = {})
click to toggle source
# File lib/traitify/request.rb, line 11 def request(method, path, options = {}) conn(url: host).send(method) do |request| request.url [version, path].join request.body = options.to_json if options end.body end