Class: Fog::Hyperv::ComputerCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/collection.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Collection

#all, #create, #get, get_method, requires, requires?

Instance Attribute Details

#clusterObject

Returns the value of attribute cluster.



70
71
72
# File 'lib/fog/collection.rb', line 70

def cluster
  @cluster
end

#computerObject

Returns the value of attribute computer.



71
72
73
# File 'lib/fog/collection.rb', line 71

def computer
  @computer
end

Class Method Details

.requires_computerObject



66
67
68
# File 'lib/fog/collection.rb', line 66

def self.requires_computer
  requires << :computer
end

Instance Method Details

#new(attributes = {}) ⇒ Object



73
74
75
76
77
# File 'lib/fog/collection.rb', line 73

def new(attributes = {})
  object = super
  object.computer_name ||= computer.name if computer && object.respond_to?(:computer_name)
  object
end