Class: Tilia::VObject::Property::ICalendar::CalAddress
- Inherits:
-
Text
- Object
- Node
- Tilia::VObject::Property
- Text
- Tilia::VObject::Property::ICalendar::CalAddress
- Defined in:
- lib/tilia/v_object/property/i_calendar/cal_address.rb
Overview
CalAddress property.
This object encodes CAL-ADDRESS values, as defined in rfc5545
Constant Summary
Constants inherited from Node
Node::PROFILE_CALDAV, Node::PROFILE_CARDDAV, Node::REPAIR
Instance Attribute Summary collapse
-
#delimiter ⇒ String?
In case this is a multi-value property.
Attributes inherited from Tilia::VObject::Property
#group, #name, #parameters, #value
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(*args) ⇒ CalAddress
constructor
A new instance of CalAddress.
-
#normalized_value ⇒ String
This returns a normalized form of the value.
-
#value_type ⇒ String
Returns the type of value.
Methods inherited from Text
#json_value, #quoted_printable_value=, #raw_mime_dir_value, #raw_mime_dir_value=, #serialize, #validate
Methods inherited from Tilia::VObject::Property
#==, #[], #[]=, #add, #delete, #destroy, #initialize_copy, #json_serialize, #json_value, #json_value=, #key?, #parts, #parts=, #raw_mime_dir_value, #raw_mime_dir_value=, #serialize, #to_s, #validate, #xml_serialize, #xml_value=
Methods inherited from Node
#==, #[], #[]=, #delete, #destroy, #each, #json_serialize, #key?, #serialize, #size, #validate, #xml_serialize
Constructor Details
#initialize(*args) ⇒ CalAddress
Returns a new instance of CalAddress.
41 42 43 44 |
# File 'lib/tilia/v_object/property/i_calendar/cal_address.rb', line 41 def initialize(*args) super(*args) @delimiter = nil end |
Instance Attribute Details
#delimiter ⇒ String?
In case this is a multi-value property. This string will be used as a delimiter.
13 14 15 |
# File 'lib/tilia/v_object/property/i_calendar/cal_address.rb', line 13 def delimiter @delimiter end |
Instance Method Details
#normalized_value ⇒ String
This returns a normalized form of the value.
This is primarily used right now to turn mixed-cased schemes in user uris to lower-case.
Evolution in particular tends to encode mailto: as MAILTO:.
33 34 35 36 37 38 39 |
# File 'lib/tilia/v_object/property/i_calendar/cal_address.rb', line 33 def normalized_value input = value return input unless input.index(':') (schema, everything_else) = input.split(':', 2) "#{schema.downcase}:#{everything_else}" end |
#value_type ⇒ String
Returns the type of value.
This corresponds to the VALUE= parameter. Every property also has a ‘default’ valueType.
21 22 23 |
# File 'lib/tilia/v_object/property/i_calendar/cal_address.rb', line 21 def value_type 'CAL-ADDRESS' end |