Module: Vpim::Icalendar::Set::Common
- Included in:
- Vevent::Maker
- Defined in:
- lib/vpim/property/common.rb
Overview
Properties common to Vevent, Vtodo, and Vjournal.
Instance Method Summary collapse
-
#access_class(token) ⇒ Object
Set the access class of the component, see Icalendar::Property::Common#access_class.
-
#add_attendee(adr) ⇒ Object
Add an attendee Address, see Icalendar::Property::Common#attendees.
-
#categories(cats = nil) ⇒ Object
Set the categories, see Icalendar::Property::Common#attendees.
-
#comment(value) ⇒ Object
Set the comment, see Icalendar::Property::Common#comments.
-
#created(time) ⇒ Object
Set the creation time, see Icalendar::Property::Common#created.
-
#description(text) ⇒ Object
Set the description, see Icalendar::Property::Common#description.
-
#dtstamp(time) ⇒ Object
Set the timestamp, see Icalendar::Property::Common#timestamp.
-
#dtstart(start) ⇒ Object
The start time or date, see Icalendar::Property::Common#dtstart.
-
#lastmod(time) ⇒ Object
Set the last modification time, see Icalendar::Property::Common#lastmod.
-
#organizer(adr = nil) ⇒ Object
Set the event organizer, an Icalendar::Address, see Icalendar::Property::Common#organizer.
-
#sequence(int) ⇒ Object
Set the sequence number, see Icalendar::Property::Common#sequence.
-
#summary(text) ⇒ Object
Set summary description of component, see Icalendar::Property::Common#summary.
-
#uid(uid) ⇒ Object
Set the unique identifier of this calendar component, see Icalendar::Property::Common#uid.
- #url(url) ⇒ Object
Instance Method Details
#access_class(token) ⇒ Object
Set the access class of the component, see Icalendar::Property::Common#access_class.
185 186 187 |
# File 'lib/vpim/property/common.rb', line 185 def access_class(token) set_token 'CLASS', ["PUBLIC", "PRIVATE", "CONFIDENTIAL"], "PUBLIC", token end |
#add_attendee(adr) ⇒ Object
Add an attendee Address, see Icalendar::Property::Common#attendees.
274 275 276 |
# File 'lib/vpim/property/common.rb', line 274 def add_attendee(adr) add_address('ATTENDEE', adr) end |
#categories(cats = nil) ⇒ Object
Set the categories, see Icalendar::Property::Common#attendees.
If cats
is provided, the categories are set to cats, either a String or an Array of String. Otherwise, and array of the existing category strings is yielded, and it can be modified.
283 284 285 286 287 288 289 290 |
# File 'lib/vpim/property/common.rb', line 283 def categories(cats = nil) #:yield: categories unless cats cats = @comp.categories yield cats end # TODO - strip the strings set_text_list('CATEGORIES', cats) end |
#comment(value) ⇒ Object
Set the comment, see Icalendar::Property::Common#comments.
293 294 295 |
# File 'lib/vpim/property/common.rb', line 293 def comment(value) set_text 'COMMENT', value end |
#created(time) ⇒ Object
Set the creation time, see Icalendar::Property::Common#created
190 191 192 |
# File 'lib/vpim/property/common.rb', line 190 def created(time) set_datetime 'CREATED', time end |
#description(text) ⇒ Object
Set the description, see Icalendar::Property::Common#description.
195 196 197 |
# File 'lib/vpim/property/common.rb', line 195 def description(text) set_text 'DESCRIPTION', text end |
#dtstamp(time) ⇒ Object
Set the timestamp, see Icalendar::Property::Common#timestamp.
206 207 208 209 |
# File 'lib/vpim/property/common.rb', line 206 def dtstamp(time) set_datetime 'DTSTAMP', time self end |
#dtstart(start) ⇒ Object
The start time or date, see Icalendar::Property::Common#dtstart.
212 213 214 215 |
# File 'lib/vpim/property/common.rb', line 212 def dtstart(start) set_date_or_datetime 'DTSTART', 'DATE-TIME', start self end |
#lastmod(time) ⇒ Object
Set the last modification time, see Icalendar::Property::Common#lastmod.
218 219 220 221 |
# File 'lib/vpim/property/common.rb', line 218 def lastmod(time) set_datetime 'LAST-MODIFIED', time self end |
#organizer(adr = nil) ⇒ Object
Set the event organizer, an Icalendar::Address, see Icalendar::Property::Common#organizer.
Without an adr
it yields an Icalendar::Address that is a copy of the current organizer (if any), allowing it to be modified.
227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/vpim/property/common.rb', line 227 def organizer(adr=nil) #:yield: organizer unless adr adr = @comp.organizer if adr adr = adr.copy else adr = Icalendar::Address.create end yield adr end set_address('ORGANIZER', adr) self end |
#sequence(int) ⇒ Object
Set the sequence number, see Icalendar::Property::Common#sequence. is no SEQUENCE; property.
201 202 203 |
# File 'lib/vpim/property/common.rb', line 201 def sequence(int) set_integer 'SEQUENCE', int end |
#summary(text) ⇒ Object
Set summary description of component, see Icalendar::Property::Common#summary.
260 261 262 |
# File 'lib/vpim/property/common.rb', line 260 def summary(text) set_text 'SUMMARY', text end |
#uid(uid) ⇒ Object
Set the unique identifier of this calendar component, see Icalendar::Property::Common#uid.
265 266 267 |
# File 'lib/vpim/property/common.rb', line 265 def uid(uid) set_text 'UID', uid end |
#url(url) ⇒ Object
269 270 271 |
# File 'lib/vpim/property/common.rb', line 269 def url(url) set_text 'URL', url end |