Sha256: 3d29e5b07e788368c4907ef7226db0f46a225a1b988223b3e4deff492f2fa6f5

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

module TZInfo
  # Represents a timezone defined by a data source.
  class TimezoneInfo
    
    # The timezone identifier.
    attr_reader :identifier
    
    # Constructs a new TimezoneInfo with an identifier.
    def initialize(identifier)
      @identifier = identifier
    end
    
    # Returns internal object state as a programmer-readable string.
    def inspect
      "#<#{self.class}: #@identifier>"
    end
    
    # Constructs a Timezone instance for the timezone represented by this
    # TimezoneInfo.
    def create_timezone
      raise NotImplementedError, 'Subclasses must override create_timezone'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tzinfo-1.2.0 lib/tzinfo/timezone_info.rb