class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/tzinfo/data_sources/constant_offset_data_timezone_info.rbs class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < TZInfo::DataSources::DataTimezoneInfo def constant_period: () -> TZInfo::OffsetTimezonePeriod def period_for: (TZInfo::Timestamp timestamp) -> TZInfo::OffsetTimezonePeriod def periods_for_local: (TZInfo::Timestamp local_timestamp) -> untyped end
Represents a data time zone defined by a constantly observed offset.
def constant_period
Experimental RBS support (using type sampling data from the type_fusion
project).
def constant_period: () -> TZInfo::OffsetTimezonePeriod
This signature was generated using 39 samples from 5 applications.
-
(TimezonePeriod)
- an unbounded {TimezonePeriod} with the constant
def constant_period OffsetTimezonePeriod.new(@constant_offset) end
def initialize(identifier, constant_offset)
-
(ArgumentError)
- if `identifier` or `constant_offset` is `nil`.
Parameters:
-
constant_offset
(TimezoneOffset
) -- the constantly observed offset. -
identifier
(String
) -- the identifier of the time zone.
def initialize(identifier, constant_offset) super(identifier) raise ArgumentError, 'constant_offset must be specified' unless constant_offset @constant_offset = constant_offset end
def period_for(timestamp)
Experimental RBS support (using type sampling data from the type_fusion
project).
def period_for: (TZInfo::Timestamp timestamp) -> TZInfo::OffsetTimezonePeriod
This signature was generated using 34 samples from 3 applications.
-
(TimezonePeriod)
- an unbounded {TimezonePeriod} for the time
Parameters:
-
timestamp
(Timestamp
) -- ignored.
def period_for(timestamp) constant_period end
def periods_for_local(local_timestamp)
Experimental RBS support (using type sampling data from the type_fusion
project).
def periods_for_local: (TZInfo::Timestamp local_timestamp) -> untyped
This signature was generated using 5 samples from 1 application.
-
(Array
- an `Array` containing a single unbounded)
Parameters:
-
local_timestamp
(Timestamp
) -- ignored.
def periods_for_local(local_timestamp) [constant_period] end
def transitions_up_to(to_timestamp, from_timestamp = nil)
-
(Array)
- an empty `Array`, since there are no transitions in time
Parameters:
-
from_timestamp
(Timestamp
) -- ignored. -
to_timestamp
(Timestamp
) -- ignored.
def transitions_up_to(to_timestamp, from_timestamp = nil) [] end