Class: Fog::Compute::Softlayer::KeyPair
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Softlayer::KeyPair
- Defined in:
- lib/fog/softlayer/models/compute/key_pair.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
24 25 26 27 28 29 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 24 def create requires :key, :label response = service.create_key_pair(attributes).body merge_attributes(response) self end |
#destroy ⇒ Object
37 38 39 40 41 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 37 def destroy requires :id service.delete_key_pair(self.id) true end |
#save ⇒ Object
20 21 22 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 20 def save identity ? update : create end |
#update ⇒ Object
31 32 33 34 35 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 31 def update requires :id merge_attributes(service.update_key_pair(self.id, self.attributes).body) self end |