Class: Googlecalendar::Event
- Inherits:
-
Object
- Object
- Googlecalendar::Event
- Defined in:
- lib/googlecalendar/event.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#created ⇒ Object
Returns the value of attribute created.
-
#description ⇒ Object
Returns the value of attribute description.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#last_modified ⇒ Object
Returns the value of attribute last_modified.
-
#location ⇒ Object
Returns the value of attribute location.
-
#rrule ⇒ Object
Returns the value of attribute rrule.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#status ⇒ Object
Returns the value of attribute status.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#time_stamp ⇒ Object
Returns the value of attribute time_stamp.
Instance Method Summary collapse
-
#rrule_as_hash ⇒ Object
‘FREQ=WEEKLY;BYDAY=MO;WKST=MO’.
- #to_s ⇒ Object
Instance Attribute Details
#class_name ⇒ Object
Returns the value of attribute class_name.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def class_name @class_name end |
#created ⇒ Object
Returns the value of attribute created.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def created @created end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def description @description end |
#end_date ⇒ Object
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def end_date @end_date end |
#last_modified ⇒ Object
Returns the value of attribute last_modified.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def last_modified @last_modified end |
#location ⇒ Object
Returns the value of attribute location.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def location @location end |
#rrule ⇒ Object
Returns the value of attribute rrule.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def rrule @rrule end |
#start_date ⇒ Object
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def start_date @start_date end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def status @status end |
#summary ⇒ Object
Returns the value of attribute summary.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def summary @summary end |
#time_stamp ⇒ Object
Returns the value of attribute time_stamp.
3 4 5 |
# File 'lib/googlecalendar/event.rb', line 3 def time_stamp @time_stamp end |
Instance Method Details
#rrule_as_hash ⇒ Object
‘FREQ=WEEKLY;BYDAY=MO;WKST=MO’
22 23 24 25 26 27 28 29 30 |
# File 'lib/googlecalendar/event.rb', line 22 def rrule_as_hash array = @rrule.split(';') hash = Hash.new array.each do |item| pair = item.split('=') hash[pair[0]] = pair[1] end return hash end |
#to_s ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/googlecalendar/event.rb', line 5 def to_s data = "---------- event ----------\n" data << 'start_date: ' + @start_date.to_s + "\n" data << 'end_date: ' + @end_date.to_s + "\n" data << 'time_stamp: ' + @time_stamp.to_s + "\n" data << 'class_name: ' + @class_name.to_s + "\n" data << 'created: ' + @created.to_s + "\n" data << 'last_modified: ' + @last_modified.to_s + "\n" data << 'status: ' + @status.to_s + "\n" data << 'rrule: ' + @rrule.to_s + "\n" data << 'summary: ' + @summary.to_s + "\n" data << 'desription: ' + @desription.to_s + "\n" data << 'location: ' + @location.to_s + "\n" return data end |