Class: Fog::Compute::Vsphere::Customfields

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/vsphere/models/compute/customfields.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#vmObject

Returns the value of attribute vm.



9
10
11
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 9

def vm
  @vm
end

Instance Method Details

#all(_filters = {}) ⇒ Object



11
12
13
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 11

def all(_filters = {})
  load service.list_customfields
end

#get(key) ⇒ Object



15
16
17
18
19
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 15

def get(key)
  load(service.list_customfields).find do |cv|
    cv.key == (key.is_a? String ? key.to_i : key)
  end
end