Module: RiCal::CoreExtensions::Time::TzidAccess
Overview
Provides a tzid attribute for ::Time and ::DateTime
Instance Attribute Summary collapse
-
#tzid ⇒ Object
The tzid attribute is used by RiCal, it should be a valid timezone identifier within a calendar, :floating to indicate a floating time, or nil to use the default timezone in effect.
Instance Method Summary collapse
-
#has_floating_timezone? ⇒ Boolean
Predicate indicating whether or not the instance represents a floating time.
-
#set_tzid(time_zone_identifier) ⇒ Object
Convenience method, sets the tzid and returns the receiver.
Instance Attribute Details
#tzid ⇒ Object
The tzid attribute is used by RiCal, it should be a valid timezone identifier within a calendar, :floating to indicate a floating time, or nil to use the default timezone in effect
See PropertyValue::DateTime#default_tzid= and Component::Calendar#tzid=
10 11 12 |
# File 'lib/ri_cal/core_extensions/time/tzid_access.rb', line 10 def tzid @tzid end |
Instance Method Details
#has_floating_timezone? ⇒ Boolean
Predicate indicating whether or not the instance represents a floating time
19 20 21 |
# File 'lib/ri_cal/core_extensions/time/tzid_access.rb', line 19 def has_floating_timezone? tzid == :floating end |
#set_tzid(time_zone_identifier) ⇒ Object
Convenience method, sets the tzid and returns the receiver
13 14 15 16 |
# File 'lib/ri_cal/core_extensions/time/tzid_access.rb', line 13 def set_tzid(time_zone_identifier) self.tzid = time_zone_identifier self end |