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

Inherits:
Object
  • Object
show all
Defined in:
lib/rackspace-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/rackspace-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’



42
43
44
45
46
47
48
# File 'lib/rackspace-fog/virtual_box/compute.rb', line 42

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

Instance Method Details

#respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/rackspace-fog/virtual_box/compute.rb', line 37

def respond_to?(method, *)
  super or @connection.respond_to? method
end