Class | GitHub::Base |
In: |
lib/git_hub/base.rb
|
Parent: | Object |
# File lib/git_hub/base.rb, line 18 def request verb, uri, params = {} full_uri = uri[0] == '/' ? base_uri+uri : uri #p "request: #{verb} #{full_uri} #{params}" res = api.request verb, full_uri, params YAML::load(res.body) if res.respond_to?(:body) #p "response: #{res}: #{res.code}: #{res.http_version}: #{res.message}", res.body end
# File lib/git_hub/base.rb, line 38 def set_resource base_uri, singulars, plurals @base_uri = base_uri @singulars = [singulars].flatten @plurals = [plurals].flatten end