File: journal.rb

package info (click to toggle)
mhc 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,452 kB
  • sloc: ruby: 12,700; lisp: 7,577; makefile: 70; sh: 68
file content (27 lines) | stat: -rw-r--r-- 986 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module RiCal
  class Component
    #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license
    #
    #  A Journal (VJOURNAL) calendar component groups properties describing a journal entry.
    #  Journals may have multiple occurrences
    # to see the property accessing methods for this class see the RiCal::Properties::Journal module
    # to see the methods for enumerating occurrences of recurring journals see the RiCal::OccurrenceEnumerator module
    class Journal < Component
      include RiCal::Properties::Journal
      include RiCal::OccurrenceEnumerator

      def self.entity_name #:nodoc:
        "VJOURNAL"
      end
      
      # Return a date_time representing the time at which the event starts
      def start_time
        dtstart.to_datetime
      end
      
      # Journals take up no calendar time, so the finish time is always the same as the start_time
      alias_method :finish_time, :start_time
      
    end
  end
end