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

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Real

Returns a new instance of Real.



32
33
34
35
# File 'lib/fog/virtual_box/compute.rb', line 32

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’



38
39
40
41
42
43
44
# File 'lib/fog/virtual_box/compute.rb', line 38

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