class TZInfo::TimezoneTransitionInfo

:nodoc:
Represents an offset defined in a Timezone data file.

def ==(tti)

equal.
considered to be equal by == if offset, previous_offset and at are all
TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are
Returns true if this TimezoneTransitionInfo is equal to the given
def ==(tti)
  tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) &&
    offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at
end

def at

occurs.
A TimeOrDateTime instance representing the UTC time when this transition
def at
  unless @at
    unless @denominator 
      @at = TimeOrDateTime.new(@numerator_or_time)
    else
      r = RubyCoreSupport.rational_new!(@numerator_or_time, @denominator)
      dt = RubyCoreSupport.datetime_new!(r, 0, Date::ITALY)
      @at = TimeOrDateTime.new(dt)
    end
  end
  
  @at
end

def eql?(tti)

originally specified.
which just requires the at times to be equal regardless of how they were
numerator_or_time and denominator are all equal. This is stronger than ==,
considered to be equal by eql? if offset, previous_offset,
TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are
Returns true if this TimezoneTransitionInfo is equal to the given
def eql?(tti)
  tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) &&
    tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) &&
    offset == tti.offset && previous_offset == tti.previous_offset &&
    numerator_or_time == tti.numerator_or_time && denominator == tti.denominator        
end

def hash

Returns a hash of this TimezoneTransitionInfo instance.
def hash
  @offset.hash ^ @previous_offset.hash ^ @numerator_or_time.hash ^ @denominator.hash
end

def initialize(offset, previous_offset, numerator_or_time, denominator = nil)

in their lowest form.
For performance reasons, the numerator and denominator must be specified

DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY)

and denominator are used to create a DateTime as follows:
seconds since the epoch. If denominator is specified numerator_or_time
if denominator is nil, numerator_or_time is treated as a number of
previous_offset (both TimezoneOffsetInfo instances) and UTC time.
Creates a new TimezoneTransitionInfo with the given offset,
def initialize(offset, previous_offset, numerator_or_time, denominator = nil)
  @offset = offset
  @previous_offset = previous_offset
  @numerator_or_time = numerator_or_time
  @denominator = denominator
  
  @at = nil
  @local_end = nil
  @local_start = nil
end

def inspect

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

def local_end

previous_offset).
causes the previous observance to end (calculated from at using
A TimeOrDateTime instance representing the local time when this transition
def local_end
  @local_end = at.add_with_convert(@previous_offset.utc_total_offset) unless @local_end      
  @local_end
end

def local_start

causes the next observance to start (calculated from at using offset).
A TimeOrDateTime instance representing the local time when this transition
def local_start
  @local_start = at.add_with_convert(@offset.utc_total_offset) unless @local_start
  @local_start
end