Module: VirtualBox::COM::Model

Defined in:
lib/virtualbox/com.rb,
lib/virtualbox/com/model/4.2.rb

Overview

The Model module will hold all the model descriptions that will be loaded according to the VirtualBox version

Defined Under Namespace

Classes: EventSource, Machine, Progress

Class Method Summary collapse

Class Method Details

.create(name, *args) ⇒ Object



24
25
26
# File 'lib/virtualbox/com.rb', line 24

def self.create(name, *args)
    self.get(name).new(*args)
end

.fetch(name) ⇒ Object



18
19
20
21
22
# File 'lib/virtualbox/com.rb', line 18

def self.fetch(name)
    self.const_get(name, false)
rescue NameError
    nil
end

.get(name) ⇒ Object



12
13
14
15
16
# File 'lib/virtualbox/com.rb', line 12

def self.get(name)
    self.const_get(name, false)
rescue NameError
    raise ModelNotFoundException, name
end