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