Class: Icalendar::Calendar

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

Constant Summary

Constants included from HasComponents

HasComponents::METHOD_MISSING_ADD_REGEX, HasComponents::METHOD_MISSING_X_FLAG_REGEX

Instance Attribute Summary

Attributes inherited from Component

#ical_name, #name, #parent

Instance Method Summary collapse

Methods inherited from Component

#new_uid, parse, #to_ical

Methods included from HasComponents

#add_component, #add_custom_component, #custom_component, included, #method_missing, #respond_to_missing?

Methods included from HasProperties

#append_custom_property, #custom_property, included, #method_missing, #property, #respond_to_missing?, #valid?

Constructor Details

#initializeCalendar

Returns a new instance of Calendar.



27
28
29
30
31
32
# File 'lib/icalendar/calendar.rb', line 27

def initialize
  super 'calendar'
  self.prodid = 'icalendar-ruby'
  self.version = '2.0'
  self.calscale = 'GREGORIAN'
end

Dynamic Method Handling

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

Instance Method Details

#addObject



49
50
51
52
# File 'lib/icalendar/calendar.rb', line 49

def add
  self.ip_method = 'ADD'
  self
end

#cancelObject



54
55
56
57
# File 'lib/icalendar/calendar.rb', line 54

def cancel
  self.ip_method = 'CANCEL'
  self
end

#counterObject



64
65
66
67
# File 'lib/icalendar/calendar.rb', line 64

def counter
  self.ip_method = 'COUNTER'
  self
end

#decline_counterObject



69
70
71
72
# File 'lib/icalendar/calendar.rb', line 69

def decline_counter
  self.ip_method = 'DECLINECOUNTER'
  self
end

#publishObject



34
35
36
37
# File 'lib/icalendar/calendar.rb', line 34

def publish
  self.ip_method = 'PUBLISH'
  self
end

#refreshObject



59
60
61
62
# File 'lib/icalendar/calendar.rb', line 59

def refresh
  self.ip_method = 'REFRESH'
  self
end

#replyObject



44
45
46
47
# File 'lib/icalendar/calendar.rb', line 44

def reply
  self.ip_method = 'REPLY'
  self
end

#requestObject



39
40
41
42
# File 'lib/icalendar/calendar.rb', line 39

def request
  self.ip_method = 'REQUEST'
  self
end