Sha256: c4a30bfb59b338110f2f210947836c3b681d2c8c7df0fb652a4d10116419d909

Contents?: true

Size: 731 Bytes

Versions: 5

Compression:

Stored size: 731 Bytes

Contents

require 'time_crisis/tzinfo/timezone_info'

module TimeCrisis
  module TZInfo
    # Represents a linked timezone defined in a data module.
    class LinkedTimezoneInfo < TimezoneInfo #:nodoc:

      # The zone that provides the data (that this zone is an alias for).
      attr_reader :link_to_identifier

      # Constructs a new TimezoneInfo with an identifier and the identifier
      # of the zone linked to.
      def initialize(identifier, link_to_identifier)
        super(identifier)
        @link_to_identifier = link_to_identifier
      end

      # Returns internal object state as a programmer-readable string.
      def inspect
        "#<#{self.class}: #@identifier,#@link_to_identifier>"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
time_crisis-0.3.5 lib/time_crisis/tzinfo/linked_timezone_info.rb
time_crisis-0.3.2 lib/time_crisis/tzinfo/linked_timezone_info.rb
time_crisis-0.3.1 lib/time_crisis/tzinfo/linked_timezone_info.rb
time_crisis-0.3.0 lib/time_crisis/tzinfo/linked_timezone_info.rb
time_crisis-0.2.0 lib/time_crisis/tzinfo/linked_timezone_info.rb