HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/ruby-2.6.8/gems/tzinfo-2.0.4/lib/tzinfo/info_timezone.rb
# encoding: UTF-8

module TZInfo

  # A {Timezone} based on a {DataSources::TimezoneInfo}.
  #
  # @abstract
  class InfoTimezone < Timezone
    # Initializes a new {InfoTimezone}.
    #
    # {InfoTimezone} instances should not normally be created directly. Use
    # the {Timezone.get} method to obtain {Timezone} instances.
    #
    # @param info [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo}
    #   instance supplied by a {DataSource} that will be used as the source of
    #   data for this {InfoTimezone}.
    def initialize(info)
      super()
      @info = info
    end

    # (see Timezone#identifier)
    def identifier
      @info.identifier
    end

    protected

    # @return [DataSources::TimezoneInfo] the {DataSources::TimezoneInfo} this
    #   {InfoTimezone} is based on.
    def info
      @info
    end
  end
end