Parent

Vpim::Icalendar::Vevent::Maker

Make a new Vevent, or make changes to an existing Vevent.

Attributes

event[R]

The event that changes are being made to.

Public Class Methods

make(event = Vpim::Icalendar::Vevent.create) click to toggle source

Make changes to event. If event is not specified, creates a new event. Yields a Vevent::Maker, and returns event.

# File lib/vpim/vevent.rb, line 151
def self.make(event = Vpim::Icalendar::Vevent.create) #:yield:maker
  m = self.new(event)
  yield m
  m.event
end

Public Instance Methods

add_rrule(rule = nil) click to toggle source

Add a RRULE to this event. The rule can be provided as a pre-build RRULE value, or the RRULE maker can be used.

# File lib/vpim/vevent.rb, line 169
def add_rrule(rule = nil, &block) #:yield: Rrule::Maker
  # TODO - should be in Property::Reccurrence::Set
  unless rule
    rule = Rrule::Maker.new(&block).encode
  end
  @comp.properties.push(Vpim::DirectoryInfo::Field.create("RRULE", rule))
  self
end
dtend(dtend) click to toggle source

Set end for events with fixed durations. end can be a Date or Time

# File lib/vpim/vevent.rb, line 163
def dtend(dtend)
  set_date_or_datetime 'DTEND', 'DATE-TIME', dtend
end
set_rrule(rule = nil) click to toggle source

Set the RRULE for this event. See add_rrule

# File lib/vpim/vevent.rb, line 179
def set_rrule(rule = nil, &block) #:yield: Rrule::Maker
  rm_all("RRULE")
  add_rrule(rule, &block)
end
transparency(token) click to toggle source

Set transparency to "OPAQUE" or "TRANSPARENT", see Vpim::Vevent#transparency.

# File lib/vpim/vevent.rb, line 158
def transparency(token)
  set_token 'TRANSP', ["OPAQUE", "TRANSPARENT"], "OPAQUE", token
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.