Class: TZInfo::Format1::TimezoneDefiner
- Inherits:
-
TZInfo::Format2::TimezoneDefiner
- Object
- TZInfo::Format2::TimezoneDefiner
- TZInfo::Format1::TimezoneDefiner
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/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.
Instance Attribute Summary
Attributes inherited from TZInfo::Format2::TimezoneDefiner
Instance Method Summary collapse
-
#offset(id, utc_offset, std_offset, abbreviation) ⇒ Object
Defines an offset.
-
#transition(year, month, offset_id, timestamp_value, datetime_numerator = nil, datetime_denominator = nil) ⇒ Object
Defines a transition to a given offset.
Methods inherited from TZInfo::Format2::TimezoneDefiner
#first_offset, #initialize, #subsequent_rules
Constructor Details
This class inherits a constructor from TZInfo::Format2::TimezoneDefiner
Instance Method Details
#offset(id, utc_offset, std_offset, abbreviation) ⇒ Object
Defines an offset.
26 27 28 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/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) ⇒ Object
Defines a transition to a given offset.
Transitions must be defined in increasing time order.
58 59 60 61 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tzinfo-2.0.5/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 |