Class: Fog::Compute::VirtualBox::Real
- Inherits:
-
Object
- Object
- Fog::Compute::VirtualBox::Real
- Defined in:
- lib/fog/virtual_box/compute.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Real
constructor
A new instance of Real.
-
#method_missing(method_sym, *arguments, &block) ⇒ Object
hack to provide ‘requests’.
- #respond_to?(method) ⇒ Boolean
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(={}) 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/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
37 38 39 |
# File 'lib/fog/virtual_box/compute.rb', line 37 def respond_to?(method, *) super or @connection.respond_to? method end |