Module: Fog::Vsphere
- Extended by:
- Provider
- Defined in:
- lib/fog/vsphere.rb,
lib/fog/vsphere/version.rb
Defined Under Namespace
Modules: Errors
Constant Summary collapse
- VERSION =
'2.5.0'.freeze
Class Method Summary collapse
-
.class_from_string(name, default_path = '') ⇒ Object
This helper was originally added as Fog.class_as_string and moved to core but only used here.
Class Method Details
.class_from_string(name, default_path = '') ⇒ Object
This helper was originally added as Fog.class_as_string and moved to core but only used here
20 21 22 23 24 25 26 |
# File 'lib/fog/vsphere.rb', line 20 def self.class_from_string(name, default_path = '') const = default_path.empty? ? name.to_s : "#{default_path}::#{name}" klass = const.split('::').inject(Object) { |m, c| m.const_get(c) } return klass unless klass == Object rescue NameError nil end |