Class: Icalendar::Offset::ActiveSupportPartial
- Inherits:
-
Icalendar::Offset
- Object
- Icalendar::Offset
- Icalendar::Offset::ActiveSupportPartial
- Defined in:
- lib/icalendar/offset/active_support_partial.rb
Instance Method Summary collapse
Methods inherited from Icalendar::Offset
Constructor Details
This class inherits a constructor from Icalendar::Offset
Instance Method Details
#normalized_tzid ⇒ Object
16 17 18 |
# File 'lib/icalendar/offset/active_support_partial.rb', line 16 def normalized_tzid [tz.tzinfo.name] end |
#normalized_value ⇒ Object
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
6 7 8 |
# File 'lib/icalendar/offset/active_support_partial.rb', line 6 def valid? support_classes_defined? && tz end |