Module: StateGeoTools::Territories

Defined in:
lib/state_geo_tools/territory_constants.rb

Overview

Constants for US territories

Constant Summary collapse

TERRITORY_DATA =

An array of hashes of all territories that we map out from.

[
  { name: 'American Samoa', code: 'AS' },
  { name: 'Federated States of Micronesia', code: 'FM' },
  { name: 'Guam', code: 'GU' },
  { name: 'Marshall Islands', code: 'MH' },
  { name: 'Northern Mariana Islands', code: 'MP' },
  { name: 'Palau', code: 'PW' },
  { name: 'Puerto Rico', code: 'PR' },
  { name: 'Virgin Islands', code: 'VI' }
].freeze
TERRITORIES =

An array of all territory names.

TERRITORY_DATA.map { |terr| terr[:name] }.freeze
TERRITORY_CODES =

An array of all two-letter territory codes.

TERRITORY_DATA.map { |terr| terr[:code] }.freeze