Class: Fog::Compute::Vsphere::Customfields
- Inherits:
-
Fog::Collection
- Object
- Array
- Fog::Collection
- Fog::Compute::Vsphere::Customfields
- Defined in:
- lib/fog/vsphere/models/compute/customfields.rb
Instance Attribute Summary collapse
-
#vm ⇒ Object
Returns the value of attribute vm.
Attributes inherited from Fog::Collection
Instance Method Summary collapse
Methods inherited from Fog::Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Attribute Details
#vm ⇒ Object
Returns the value of attribute vm.
12 13 14 |
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 12 def vm @vm end |
Instance Method Details
#all(filters = {}) ⇒ Object
14 15 16 |
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 14 def all(filters = {}) load service.list_customfields() end |
#get(key) ⇒ Object
18 19 20 21 22 |
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 18 def get(key) load(service.list_customfields()).find do | cv | cv.key == ((key.is_a? String) ? key.to_i : key) end end |