Class: DeltacloudVM::Client::Metric::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/deltacloud_vm/client/models/metric.rb

Defined Under Namespace

Classes: Sample

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, samples = []) ⇒ Property

Returns a new instance of Property.



30
31
32
33
# File 'lib/deltacloud_vm/client/models/metric.rb', line 30

def initialize(name, samples=[])
  @name = name
  samples.each { |s| self << s }
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



28
29
30
# File 'lib/deltacloud_vm/client/models/metric.rb', line 28

def name
  @name
end

#samplesObject (readonly)

Returns the value of attribute samples.



28
29
30
# File 'lib/deltacloud_vm/client/models/metric.rb', line 28

def samples
  @samples
end

Instance Method Details

#<<(values) ⇒ Object



35
36
37
38
# File 'lib/deltacloud_vm/client/models/metric.rb', line 35

def <<(values)
  @samples ||= []
  @samples << Sample.new(values)
end