Sha256: 80e364ec3da72b013b6a2c2c7761e286d301e3e83a9fd49ed1fecc8840b49707

Contents?: true

Size: 607 Bytes

Versions: 22

Compression:

Stored size: 607 Bytes

Contents

module VirtualBox
  # Represents the media registry within the global VirtualBox configuration.
  class Media < AbstractModel
    attribute :parent, :readonly => true
    relationship :hard_drives, :HardDrive
    relationship :dvds, :DVD

    class << self
      def populate_relationship(caller, lib)
        new(caller, lib)
      end
    end

    def initialize(parent, lib)
      populate_attributes({ :parent => parent }, :ignore_relationships => true)
      populate_relationship(:hard_drives, lib.virtualbox.hard_disks)
      populate_relationship(:dvds, lib.virtualbox.dvd_images)
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
virtualbox-0.9.2 lib/virtualbox/media.rb
virtualbox-0.9.1 lib/virtualbox/media.rb
virtualbox-0.9.0 lib/virtualbox/media.rb
virtualbox-0.8.6 lib/virtualbox/media.rb
virtualbox-0.8.5 lib/virtualbox/media.rb
virtualbox-0.8.4 lib/virtualbox/media.rb
velir_virtualbox-0.8.4 lib/virtualbox/media.rb
virtualbox-0.8.3 lib/virtualbox/media.rb
virtualbox-0.8.2 lib/virtualbox/media.rb
virtualbox-0.8.1 lib/virtualbox/media.rb
virtualbox-0.8.0 lib/virtualbox/media.rb
virtualbox-0.7.9 lib/virtualbox/media.rb
virtualbox-0.7.8 lib/virtualbox/media.rb
virtualbox-0.7.7 lib/virtualbox/media.rb
virtualbox-0.7.6 lib/virtualbox/media.rb
bbrowning-virtualbox-0.7.6.dev lib/virtualbox/media.rb
virtualbox-0.7.5 lib/virtualbox/media.rb
virtualbox-0.7.4 lib/virtualbox/media.rb
virtualbox-0.7.3 lib/virtualbox/media.rb
virtualbox-0.7.2 lib/virtualbox/media.rb