Class: Vcard::V3_0::PropertyValue::Integer

Inherits:
Vobject::PropertyValue show all
Includes:
Comparable
Defined in:
lib/vobject/vcard/v3_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) ⇒ Integer

Returns a new instance of Integer.



146
147
148
149
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 146

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

Instance Method Details

#<=>(another) ⇒ Object



142
143
144
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 142

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

#to_hashObject



155
156
157
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 155

def to_hash
  value
end

#to_sObject



151
152
153
# File 'lib/vobject/vcard/v3_0/propertyvalue.rb', line 151

def to_s
  value.to_s
end