Module: Icalendar

Defined in:
lib/icalendar.rb,
lib/icalendar/todo.rb,
lib/icalendar/alarm.rb,
lib/icalendar/event.rb,
lib/icalendar/value.rb,
lib/icalendar/logger.rb,
lib/icalendar/parser.rb,
lib/icalendar/tzinfo.rb,
lib/icalendar/journal.rb,
lib/icalendar/version.rb,
lib/icalendar/calendar.rb,
lib/icalendar/freebusy.rb,
lib/icalendar/timezone.rb,
lib/icalendar/component.rb,
lib/icalendar/values/uri.rb,
lib/icalendar/values/date.rb,
lib/icalendar/values/text.rb,
lib/icalendar/values/time.rb,
lib/icalendar/values/array.rb,
lib/icalendar/values/float.rb,
lib/icalendar/values/recur.rb,
lib/icalendar/values/binary.rb,
lib/icalendar/values/period.rb,
lib/icalendar/downcased_hash.rb,
lib/icalendar/has_components.rb,
lib/icalendar/has_properties.rb,
lib/icalendar/values/boolean.rb,
lib/icalendar/values/integer.rb,
lib/icalendar/values/duration.rb,
lib/icalendar/values/date_time.rb,
lib/icalendar/values/utc_offset.rb,
lib/icalendar/values/cal_address.rb,
lib/icalendar/values/time_with_zone.rb,
lib/icalendar/values/date_or_date_time.rb,
lib/icalendar/values/active_support_time_with_zone_adapter.rb

Defined Under Namespace

Modules: HasComponents, HasProperties, TimezoneOffset, TimezoneTransition, Values Classes: Alarm, Calendar, Component, DowncasedHash, Event, Freebusy, Journal, Logger, Parser, Timezone, Todo, Value

Constant Summary collapse

MAX_LINE_LENGTH =
75
VERSION =
'2.4.1'

Class Method Summary collapse

Class Method Details

.DowncasedHash(base) ⇒ Object


32
33
34
35
36
37
38
39
# File 'lib/icalendar/downcased_hash.rb', line 32

def self.DowncasedHash(base)
  case base
  when Icalendar::DowncasedHash then base
  when Hash then Icalendar::DowncasedHash.new(base)
  else
    fail ArgumentError
  end
end

.loggerObject


7
8
9
# File 'lib/icalendar.rb', line 7

def self.logger
  @logger ||= Icalendar::Logger.new(STDERR)
end

.logger=(logger) ⇒ Object


11
12
13
# File 'lib/icalendar.rb', line 11

def self.logger=(logger)
  @logger = logger
end

.parse(source, single = false) ⇒ Object


15
16
17
18
19
# File 'lib/icalendar.rb', line 15

def self.parse(source, single = false)
  warn "**** DEPRECATION WARNING ****\nIcalendar.parse will be removed. Please switch to Icalendar::Calendar.parse."
  calendars = Parser.new(source).parse
  single ? calendars.first : calendars
end