Class: Fog::Compute::Ovirt::Mock
- Inherits:
-
Object
- Object
- Fog::Compute::Ovirt::Mock
- Defined in:
- lib/fog/ovirt/compute.rb
Overview
rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
-
#method_missing(symbol, *args) ⇒ Object
rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing.
- #respond_to?(symbol, include_all = false) ⇒ Boolean
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( = {}) if [:api_version] == "v4" Fog::Compute::Ovirt::V4::Mock.send(:include, Fog::Compute::Ovirt::Collections) @client = Fog::Compute::Ovirt::V4::Mock.new() else Fog::Compute::Ovirt::V3::Mock.send(:include, Fog::Compute::Ovirt::Collections) @client = Fog::Compute::Ovirt::V3::Mock.new() 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
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 |