Class: Fog::Hyperv::Compute::Servers
- Inherits:
-
Fog::Hyperv::Collection
- Object
- Collection
- Fog::Hyperv::Collection
- Fog::Hyperv::Compute::Servers
- Defined in:
- lib/fog/hyperv/compute/models/servers.rb
Instance Method Summary collapse
Methods inherited from Fog::Hyperv::Collection
#all, get_method, #initialize, #new, requires, requires?
Constructor Details
This class inherits a constructor from Fog::Hyperv::Collection
Instance Method Details
#get(identifier, **filters) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/fog/hyperv/compute/models/servers.rb', line 9 def get(identifier, **filters) id = identifier if identifier =~ /\A#{Fog::Hyperv::GUID}\z/i name = identifier unless id raise ArgumentError, 'Must provide a name or GUID' if (id.nil? || id.empty?) && (name.nil? || name.empty?) super(name:, id:, **filters) end |