Class: Heroku::Conn
- Inherits:
-
Object
show all
- Defined in:
- lib/heroku/conn.rb
Defined Under Namespace
Classes: APIRequest, Cache
Class Method Summary
collapse
Class Method Details
.cache ⇒ Object
15
16
17
|
# File 'lib/heroku/conn.rb', line 15
def self.cache
@cache ||= Heroku::Conn::Cache.new
end
|
.method_missing(method, end_point, opts = {}) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/heroku/conn.rb', line 19
def self.method_missing(method, end_point, opts = {})
_Request = Net::HTTP.const_get(method.capitalize)
req = _Request.new(end_point, (opts))
req.body = opts[:body]
api_req = APIRequest[method, end_point]
Heroku::Properties.logger.debug("[Conn] Attempting #{method.upcase} #{end_point} ...")
check_response(api_req, opts[:r_type], @https.request(req))
end
|