Class: Vobject::PropertyValue
- Inherits:
-
Object
- Object
- Vobject::PropertyValue
- Defined in:
- lib/vobject/propertyvalue.rb
Direct Known Subclasses
Vcard::V3_0::PropertyValue::Address, Vcard::V3_0::PropertyValue::Agent, Vcard::V3_0::PropertyValue::Date, Vcard::V3_0::PropertyValue::DateTimeLocal, Vcard::V3_0::PropertyValue::Fivepartname, Vcard::V3_0::PropertyValue::Float, Vcard::V3_0::PropertyValue::Geovalue, Vcard::V3_0::PropertyValue::Integer, Vcard::V3_0::PropertyValue::Org, Vcard::V3_0::PropertyValue::Text, Vcard::V3_0::PropertyValue::Textlist, Vcard::V3_0::PropertyValue::Time, Vcard::V3_0::PropertyValue::Utcoffset, Vcard::V3_0::PropertyValue::Version, Vcard::V4_0::PropertyValue::Address, Vcard::V4_0::PropertyValue::Date, Vcard::V4_0::PropertyValue::DateTimeLocal, Vcard::V4_0::PropertyValue::Fivepartname, Vcard::V4_0::PropertyValue::Float, Vcard::V4_0::PropertyValue::Gender, Vcard::V4_0::PropertyValue::Integer, Vcard::V4_0::PropertyValue::Org, Vcard::V4_0::PropertyValue::Text, Vcard::V4_0::PropertyValue::Textlist, Vcard::V4_0::PropertyValue::Time, Vcard::V4_0::PropertyValue::Utcoffset, Vcard::V4_0::PropertyValue::Version, Vcalendar::PropertyValue::Boolean, Vcalendar::PropertyValue::Calscale, Vcalendar::PropertyValue::Date, Vcalendar::PropertyValue::DateTimeLocal, Vcalendar::PropertyValue::DateTimeUTC, Vcalendar::PropertyValue::Datelist, Vcalendar::PropertyValue::Datetimelist, Vcalendar::PropertyValue::Datetimeutclist, Vcalendar::PropertyValue::Duration, Vcalendar::PropertyValue::Float, Vcalendar::PropertyValue::Geovalue, Vcalendar::PropertyValue::Integer, Vcalendar::PropertyValue::Periodlist, Vcalendar::PropertyValue::Recur, Vcalendar::PropertyValue::Requeststatusvalue, Vcalendar::PropertyValue::Text, Vcalendar::PropertyValue::Textlist, Vcalendar::PropertyValue::Time, Vcalendar::PropertyValue::Utcoffset, Vcalendar::PropertyValue::Version
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#norm ⇒ Object
Returns the value of attribute norm.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(another) ⇒ Object
-
#initialize(val) ⇒ PropertyValue
constructor
A new instance of PropertyValue.
- #name ⇒ Object
- #to_hash ⇒ Object
- #to_norm ⇒ Object
-
#to_s ⇒ Object
raise_invalid_initialization if key != name.
Constructor Details
#initialize(val) ⇒ PropertyValue
Returns a new instance of PropertyValue.
9 10 11 12 13 |
# File 'lib/vobject/propertyvalue.rb', line 9 def initialize(val) self.value = val self.type = "text" # safe default self.norm = nil end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/vobject/propertyvalue.rb', line 3 def errors @errors end |
#norm ⇒ Object
Returns the value of attribute norm.
3 4 5 |
# File 'lib/vobject/propertyvalue.rb', line 3 def norm @norm end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/vobject/propertyvalue.rb', line 3 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/vobject/propertyvalue.rb', line 3 def value @value end |
Instance Method Details
#<=>(another) ⇒ Object
5 6 7 |
# File 'lib/vobject/propertyvalue.rb', line 5 def <=>(another) self.value <=> another.value end |
#name ⇒ Object
32 33 34 |
# File 'lib/vobject/propertyvalue.rb', line 32 def name type end |
#to_hash ⇒ Object
28 29 30 |
# File 'lib/vobject/propertyvalue.rb', line 28 def to_hash value end |
#to_norm ⇒ Object
21 22 23 24 25 26 |
# File 'lib/vobject/propertyvalue.rb', line 21 def to_norm if norm.nil? norm = to_s end norm end |
#to_s ⇒ Object
raise_invalid_initialization if key != name
17 18 19 |
# File 'lib/vobject/propertyvalue.rb', line 17 def to_s value end |