Class: DeltaCloud::HWP::FloatProperty

Inherits:
Property
  • Object
show all
Defined in:
lib/hwp_properties.rb

Overview

FloatProperty is like Property but return value is Float instead of String.

Instance Attribute Summary

Attributes inherited from Property

#kind, #name, #unit, #value

Instance Method Summary collapse

Methods inherited from Property

#present?

Constructor Details

#initialize(xml, name) ⇒ FloatProperty

Returns a new instance of FloatProperty.



57
58
59
60
# File 'lib/hwp_properties.rb', line 57

def initialize(xml, name)
  super(xml, name)
  @value = @value.to_f if @value
end