Class: Fog::Compute::VirtualBox::Real

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/compute/virtual_box.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Real

Returns a new instance of Real.



29
30
31
32
# File 'lib/fog/compute/virtual_box.rb', line 29

def initialize(options={})
  require 'virtualbox'
  @connection = ::VirtualBox::Global.global.lib.virtualbox
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_sym, *arguments, &block) ⇒ Object

hack to provide ‘requests’



35
36
37
38
39
40
41
# File 'lib/fog/compute/virtual_box.rb', line 35

def method_missing(method_sym, *arguments, &block)
  if @connection.respond_to?(method_sym)
    @connection.send(method_sym, *arguments)
  else
    super
  end
end