Class: Ghee::API::Orgs::Proxy
- Inherits:
-
ResourceProxy
- Object
- ResourceProxy
- Ghee::API::Orgs::Proxy
- Includes:
- CUD
- Defined in:
- lib/ghee/api/orgs.rb
Overview
Orgs::Proxy inherits from Ghee::Proxy and enables defining methods on the proxy object
Instance Attribute Summary
Attributes inherited from ResourceProxy
#connection, #current_page, #pagination, #params, #path_prefix, #total
Instance Method Summary collapse
-
#repos(name = nil, params = {}) ⇒ Object
Repos for a orgs.
-
#teams(number = nil, params = {}) ⇒ Object
Teams for an org.
Methods included from CUD
Methods inherited from ResourceProxy
#all, #initialize, #method_missing, #paginate, #subject
Constructor Details
This class inherits a constructor from Ghee::ResourceProxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ghee::ResourceProxy
Instance Method Details
#repos(name = nil, params = {}) ⇒ Object
Repos for a orgs
Returns json
72 73 74 75 76 |
# File 'lib/ghee/api/orgs.rb', line 72 def repos(name=nil,params={}) params = name if name.is_a?Hash prefix = (!name.is_a?(Hash) and name) ? "/repos/#{self["login"]}/#{name}" : "#{path_prefix}/repos" Ghee::API::Repos::Proxy.new(connection,prefix,params) end |
#teams(number = nil, params = {}) ⇒ Object
Teams for an org
Returns json
62 63 64 65 66 |
# File 'lib/ghee/api/orgs.rb', line 62 def teams(number=nil,params={}) params = number if number.is_a?Hash prefix = (!number.is_a?(Hash) and number) ? "/teams/#{number}" : "#{path_prefix}/teams" Ghee::API::Orgs::Teams::Proxy.new(connection, prefix, params) end |