Class: Fog::Compute::Packet::Membership
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Packet::Membership
- Defined in:
- lib/fog/compute/packet/models/membership.rb
Overview
Membership Model
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ Membership
constructor
A new instance of Membership.
- #update ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Membership
Returns a new instance of Membership.
16 17 18 |
# File 'lib/fog/compute/packet/models/membership.rb', line 16 def initialize(attributes = {}) super end |
Instance Method Details
#destroy ⇒ Object
30 31 32 33 34 |
# File 'lib/fog/compute/packet/models/membership.rb', line 30 def destroy requires :id response = service.delete_membership(id) true if response.status == 204 end |
#update ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/fog/compute/packet/models/membership.rb', line 20 def update requires :id = { :roles => roles } response = service.update_membership(id, ) merge_attributes(response.body) if response.status == 200 end |