Method: OneviewSDK.const_missing
- Defined in:
- lib/oneview-sdk.rb
.const_missing(const) ⇒ Object
This method will help redirect to resources within the API module that is currently in use. It should NOT be called directly. For example, if @@api_version is set to 200, then accessing OneviewSDK::EthernetNetwork will redirect to OneviewSDK::API200::EthernetNetwork
59 60 61 62 63 64 |
# File 'lib/oneview-sdk.rb', line 59 def self.const_missing(const) api_module = OneviewSDK.const_get("API#{@api_version}") api_module.const_get(const) rescue NameError raise NameError, "The #{const} method or resource does not exist for OneView API version #{@api_version}." end |