class TZInfo::DataSources::CountryInfo

{DataSource}.
Represents a country and references to its time zones as returned by a

def initialize(code, name, zones)

Raises:
  • (ArgumentError) - if `code`, `name` or `zones` is `nil`.

Parameters:
  • zones (Array) -- the time zones observed in the
  • name (String) -- the name of the country.
  • code (String) -- an ISO 3166-1 alpha-2 country code.
def initialize(code, name, zones)
  raise ArgumentError, 'code must be specified' unless code
  raise ArgumentError, 'name must be specified' unless name
  raise ArgumentError, 'zones must be specified' unless zones
  @code = code.freeze
  @name = name.freeze
  @zones = zones.freeze
end

def inspect

Returns:
  • (String) - the internal object state as a programmer-readable
def inspect
  "#<#{self.class}: #@code>"
end