Class: Vcard::V4_0::PropertyValue::Float

Inherits:
Vobject::PropertyValue show all
Includes:
Comparable
Defined in:
lib/vobject/vcard/v4_0/propertyvalue.rb

Instance Attribute Summary

Attributes inherited from Vobject::PropertyValue

#errors, #norm, #type, #value

Instance Method Summary collapse

Methods inherited from Vobject::PropertyValue

#name, #to_norm

Constructor Details

#initialize(val) ⇒ Float

Returns a new instance of Float.



114
115
116
117
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 114

def initialize(val)
  self.value = val
  self.type = "float"
end

Instance Method Details

#<=>(another) ⇒ Object



110
111
112
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 110

def <=>(another)
  value <=> another.value
end

#to_hashObject



123
124
125
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 123

def to_hash
  value
end

#to_sObject



119
120
121
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 119

def to_s
  value
end