Class: Icalendar::Offset::ActiveSupportPartial

Inherits:
Icalendar::Offset show all
Defined in:
lib/icalendar/offset/active_support_partial.rb

Instance Method Summary collapse

Methods inherited from Icalendar::Offset

build, #initialize

Constructor Details

This class inherits a constructor from Icalendar::Offset

Instance Method Details

#normalized_tzidObject



16
17
18
# File 'lib/icalendar/offset/active_support_partial.rb', line 16

def normalized_tzid
  [tz.tzinfo.name]
end

#normalized_valueObject



10
11
12
13
14
# File 'lib/icalendar/offset/active_support_partial.rb', line 10

def normalized_value
  # plan c - try to find an ActiveSupport::TimeWithZone based on the first word of the tzid
  Icalendar.logger.debug("Plan c - parsing #{value}/#{tz.tzinfo.name} as ActiveSupport::TimeWithZone")
  Icalendar::Values::Helpers::ActiveSupportTimeWithZoneAdapter.new(nil, tz, value)
end

#valid?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/icalendar/offset/active_support_partial.rb', line 6

def valid?
  support_classes_defined? && tz
end