Class: Fog::Compute::Ovirt::Mock

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

Overview

rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



79
80
81
82
83
84
85
86
87
# File 'lib/fog/ovirt/compute.rb', line 79

def initialize(options = {})
  if options[:api_version] == "v4"
    Fog::Compute::Ovirt::V4::Mock.send(:include, Fog::Compute::Ovirt::Collections)
    @client = Fog::Compute::Ovirt::V4::Mock.new(options)
  else
    Fog::Compute::Ovirt::V3::Mock.send(:include, Fog::Compute::Ovirt::Collections)
    @client = Fog::Compute::Ovirt::V3::Mock.new(options)
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args) ⇒ Object

rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing



90
91
92
# File 'lib/fog/ovirt/compute.rb', line 90

def method_missing(symbol, *args)
  @client.__send__(symbol, *args)
end

Instance Method Details

#respond_to?(symbol, include_all = false) ⇒ Boolean

Returns:

  • (Boolean)


94
95
96
# File 'lib/fog/ovirt/compute.rb', line 94

def respond_to?(symbol, include_all = false)
  @client.respond_to?(symbol, include_all)
end