Class: TZInfo::Format1::TimezoneDefiner Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
TZInfo::Format2::TimezoneDefiner
|
Defined in: | lib/tzinfo/format1/timezone_definer.rb |
Overview
Instances of TimezoneDefiner
are yielded to TZInfo::Data
format 1 modules by TimezoneDefinition
to allow the offsets and
transitions of the time zone to be specified.
Class Method Summary
::TZInfo::Format2::TimezoneDefiner
- Inherited
.new | Initializes a new |
Instance Attribute Summary
::TZInfo::Format2::TimezoneDefiner
- Inherited
Instance Method Summary
-
#offset(id, utc_offset, std_offset, abbreviation)
Internal use only
Defines an offset.
-
#transition(year, month, offset_id, timestamp_value, datetime_numerator = nil, datetime_denominator = nil)
Internal use only
Defines a transition to a given offset.
::TZInfo::Format2::TimezoneDefiner
- Inherited
#first_offset | Returns the first offset to be defined or |
#offset | Defines an offset. |
#subsequent_rules | Defines the rules that will be used for handling instants after the last transition. |
#transition | Defines a transition to a given offset. |
Instance Method Details
#offset(id, utc_offset, std_offset, abbreviation)
Defines an offset.
# File 'lib/tzinfo/format1/timezone_definer.rb', line 26
def offset(id, utc_offset, std_offset, abbreviation) super(id, utc_offset, std_offset, abbreviation.to_s) end
#transition(year, month, offset_id, timestamp_value, datetime_numerator = nil, datetime_denominator = nil)
Defines a transition to a given offset.
Transitions must be defined in increasing time order.
# File 'lib/tzinfo/format1/timezone_definer.rb', line 58
def transition(year, month, offset_id, , datetime_numerator = nil, datetime_denominator = nil) raise ArgumentError, 'DateTime-only transitions are not supported' if datetime_numerator && !datetime_denominator super(offset_id, ) end