Class: Icalendar::Todo

Inherits:
Component show all
Defined in:
lib/icalendar/component/todo.rb

Overview

A Todo calendar component is a grouping of component properties and possibly Alarm calendar components that represent an action-item or assignment. For example, it can be used to represent an item of work assigned to an individual; such as “turn in travel expense today”.

Instance Attribute Summary collapse

Attributes inherited from Component

#name, #properties, #property_params

Instance Method Summary collapse

Methods inherited from Component

#method_missing, #print_string

Constructor Details

#initializeTodo

Returns a new instance of Todo.



11
12
13
14
15
# File 'lib/icalendar/component/todo.rb', line 11

def initialize()
  super("VTODO")
  
  @alarms = alarms
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Icalendar::Component

Instance Attribute Details

#alarmsObject (readonly)

Returns the value of attribute alarms.



9
10
11
# File 'lib/icalendar/component/todo.rb', line 9

def alarms
  @alarms
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/icalendar/component/todo.rb', line 17

def to_s
  print_string { |s| @alarms.each { |alarm| alarm.to_s } }
end