Module: Ghee::CUD
- Included in:
- API::Authorizations::Proxy, API::Gists::Proxy, API::Issues::Comments::Proxy, API::Issues::Proxy, API::Milestones::Proxy, API::Orgs::Proxy, API::Orgs::Teams::Proxy, API::Repos::Commits::Proxy, API::Repos::Git::Blobs::Proxy, API::Repos::Git::Commits::Proxy, API::Repos::Git::Refs::Proxy, API::Repos::Git::Tags::Proxy, API::Repos::Git::Trees::Proxy, API::Repos::Hooks::Proxy, API::Repos::Labels::Proxy, API::Users::Proxy
- Defined in:
- lib/ghee/state_methods.rb
Instance Method Summary collapse
-
#create(attributes) ⇒ Object
Creates .
-
#destroy ⇒ Object
Destroys .
-
#patch(attributes) ⇒ Object
Patchs .
Instance Method Details
#create(attributes) ⇒ Object
Creates
return json
8 9 10 |
# File 'lib/ghee/state_methods.rb', line 8 def create(attributes) connection.post(path_prefix,attributes).body end |
#destroy ⇒ Object
Destroys
return boolean
24 25 26 |
# File 'lib/ghee/state_methods.rb', line 24 def destroy connection.delete(path_prefix).status == 204 end |
#patch(attributes) ⇒ Object
Patchs
return json
16 17 18 |
# File 'lib/ghee/state_methods.rb', line 16 def patch(attributes) connection.patch(path_prefix, attributes).body end |