Class: Fog::XenServer::Compute::Models::Vdi

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/xenserver/compute/models/vdi.rb

Instance Method Summary collapse

Methods included from ClassMethods

#collection_name, #provider_class, #require_before_save

Methods included from InstanceMethods

#collection, #method_missing, #provider_class, #require_creation_attributes, #respond_to?, #save, #set_attribute

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Fog::XenServer::Compute::Models::InstanceMethods

Instance Method Details

#can_be_destroyed?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/fog/xenserver/compute/models/vdi.rb', line 51

def can_be_destroyed?
  allowed_operations.include?("destroy")
end

#destroyObject



55
56
57
58
# File 'lib/fog/xenserver/compute/models/vdi.rb', line 55

def destroy
  return service.destroy_record(reference, provider_class) if can_be_destroyed?
  false
end