Class: Ghee::API::Repos::Milestones::Proxy
- Inherits:
-
ResourceProxy
- Object
- ResourceProxy
- Ghee::API::Repos::Milestones::Proxy
- Includes:
- CUD
- Defined in:
- lib/ghee/api/milestones.rb
Overview
Gists::Proxy inherits from Ghee::Proxy and enables defining methods on the proxy object
Instance Attribute Summary
Attributes inherited from ResourceProxy
#connection, #current_page, #id, #pagination, #params, #path_prefix, #total
Instance Method Summary collapse
-
#close ⇒ Object
Close milestone - closed milestone by id.
-
#closed ⇒ Object
Returns closed milestones.
Methods included from CUD
Methods inherited from ResourceProxy
accept_header, #all, #all_parallel, #build_prefix, #initialize, #method_missing, #paginate, #raw, #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
#close ⇒ Object
Close milestone - closed milestone by id
usage - ghee.repos(“my_repo”).milestones(1).close
returns boolean
28 29 30 |
# File 'lib/ghee/api/milestones.rb', line 28 def close connection.patch(path_prefix,:state => "closed").body["state"] == "closed" end |
#closed ⇒ Object
Returns closed milestones
Returns json
36 37 38 39 40 41 |
# File 'lib/ghee/api/milestones.rb', line 36 def closed response = connection.get path_prefix do |req| req.params["state"] = "closed" end response.body end |