Class: VirtualBox::DVD

Inherits:
Medium show all
Defined in:
lib/virtualbox/dvd.rb

Overview

Represents a DVD image stored by VirtualBox. These DVD images can be mounted onto virtual machines. Because DVD just inherits from Medium, it also inherits all methods and attributes which are on Medium. For more attributes, the ability to destroy, etc, please view Medium.

# Finding all DVDs

The only method at the moment of finding DVDs is to use DVD.all, which returns an array of DVDs.

DVD.all

Class Method Summary collapse

Methods inherited from Medium

#destroy, #destroy_storage, #filename, #initialize, #initialize_attributes, #load_relationship, populate_array_relationship, populate_relationship, populate_single_relationship

Methods included from SubclassListing

included

Methods inherited from AbstractModel

#destroy, #errors, errors_for_relationship, #existing_record!, #inspect, #lazy_attribute?, #lazy_relationship?, #new_record!, #new_record?, #parent_machine, #populate_attributes, #populate_relationship, #populate_relationships, reload!, #reload!, reload?, reloaded!, #save, #save!, #save_attribute, #save_changed_interface_attributes, #save_interface_attribute, #set_relationship, #validate, #write_attribute

Methods included from AbstractModel::Validatable

#__validates_extract_options, #add_error, #clear_errors, #errors, #errors_on, #full_error_messages, #valid?, #validate, #validates_format_of, #validates_inclusion_of, #validates_numericality_of, #validates_presence_of

Methods included from AbstractModel::Relatable

#destroy_relationship, #destroy_relationships, #has_relationship?, included, #lazy_relationship?, #loaded_relationship?, #populate_relationship, #populate_relationships, #read_relationship, #relationship_class, #relationship_data, #save_relationship, #save_relationships, #set_relationship

Methods included from AbstractModel::VersionMatcher

#assert_version_match, #split_version, #version_match?

Methods included from AbstractModel::Dirty

#changed?, #changes, #clear_dirty!, #ignore_dirty, #method_missing, #set_dirty!

Methods included from AbstractModel::InterfaceAttributes

#load_interface_attribute, #load_interface_attributes, #save_interface_attribute, #save_interface_attributes, #spec_to_proc

Methods included from AbstractModel::Attributable

#attributes, #has_attribute?, included, #lazy_attribute?, #loaded_attribute?, #populate_attributes, #read_attribute, #readonly_attribute?, #write_attribute

Methods included from Logger

included, #logger, #logger_output=

Constructor Details

This class inherits a constructor from VirtualBox::Medium

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class VirtualBox::AbstractModel::Dirty

Class Method Details

.allObject

Returns an array of all available DVDs as DVD objects



17
18
19
# File 'lib/virtualbox/dvd.rb', line 17

def all
  Global.global.media.dvds
end

.device_typeObject

Override of Medium.device_type.



22
23
24
# File 'lib/virtualbox/dvd.rb', line 22

def device_type
  :dvd
end