| Class | TZInfo::CountryTimezone |
| In: |
lib/tzinfo/country_timezone.rb
|
| Parent: | Object |
Returns true if and only if the given CountryTimezone is equal to the current CountryTimezone (has the same identifer, latitude, longitude and description).
# File lib/tzinfo/country_timezone.rb, line 78 def ==(ct) ct.respond_to?(:identifier) && ct.respond_to?(:latitude) && ct.respond_to?(:longitude) && ct.respond_to?(:description) && identifier == ct.identifier && latitude == ct.latitude && longitude == ct.longitude && description == ct.description end
if description is not nil, this method returns description; otherwise it returns timezone.friendly_identifier(true).
# File lib/tzinfo/country_timezone.rb, line 61 def description_or_friendly_identifier description || timezone.friendly_identifier(true) end
Returns true if and only if the given CountryTimezone is equal to the current CountryTimezone (has the same identifer, latitude, longitude and description).
# File lib/tzinfo/country_timezone.rb, line 88 def eql?(ct) self == ct end
Returns a hash of this CountryTimezone.
# File lib/tzinfo/country_timezone.rb, line 93 def hash @identifier.hash ^ @latitude_numerator.hash ^ @latitude_denominator.hash ^ @longitude_numerator.hash ^ @longitude_denominator.hash ^ @description.hash end
Returns internal object state as a programmer-readable string.
# File lib/tzinfo/country_timezone.rb, line 99 def inspect "#<#{self.class}: #@identifier>" end
The Timezone (actually a TimezoneProxy for performance reasons).
# File lib/tzinfo/country_timezone.rb, line 55 def timezone Timezone.get_proxy(@identifier) end