Class: Vcard::V4_0::PropertyValue::Integer

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) ⇒ Integer

Returns a new instance of Integer.



134
135
136
137
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 134

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

Instance Method Details

#<=>(another) ⇒ Object



130
131
132
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 130

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

#to_hashObject



143
144
145
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 143

def to_hash
  value
end

#to_sObject



139
140
141
# File 'lib/vobject/vcard/v4_0/propertyvalue.rb', line 139

def to_s
  value.to_s
end