Class: VBox::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/virtualbox/base.rb
Direct Known Subclasses
AdditionsFacility, Appliance, AudioAdapter, BIOSSettings, BandwidthControl, BandwidthGroup, Console, DHCPServer, Directory, Display, Event, EventListener, EventSource, File, FsObjInfo, Guest, GuestSession, Host, HostNetworkInterface, Keyboard, Machine, ManagedObjectRef, Medium, MediumFormat, Mouse, NATEngine, NetworkAdapter, ParallelPort, PerformanceCollector, PerformanceMetric, Process, Progress, SerialPort, Session, SharedFolder, Snapshot, StorageController, SystemProperties, USBController, USBDevice, USBDeviceFilter, VFSExplorer, VRDEServer, VRDEServerInfo, VirtualBox, VirtualBoxErrorInfo, VirtualSystemDescription, WebsessionManager
Instance Method Summary
collapse
Constructor Details
#initialize(obj_ref) ⇒ Base
Returns a new instance of Base.
9
10
11
|
# File 'lib/virtualbox/base.rb', line 9
def initialize(obj_ref)
@ref = obj_ref
end
|
Instance Method Details
#_this ⇒ Object
13
14
15
16
17
|
# File 'lib/virtualbox/base.rb', line 13
def _this
_this = {}
_this[:_this] = @ref unless @ref.nil?
_this
end
|
#delete! ⇒ Object
23
24
25
|
# File 'lib/virtualbox/base.rb', line 23
def delete!
VBox::ManagedObjectRef.new(@ref).release
end
|
#ensure_hash(args) ⇒ Object
27
28
29
|
# File 'lib/virtualbox/base.rb', line 27
def ensure_hash(args)
raise ArgumentError, 'Method arguments must be a hash' unless args.is_a?(Hash)
end
|
#vbox_class ⇒ Object
19
20
21
|
# File 'lib/virtualbox/base.rb', line 19
def vbox_class
VBox::ManagedObjectRef.new(@ref).get_interface_name
end
|