lib/geolookup/usa/state.rb in geolookup-0.5.10 vs lib/geolookup/usa/state.rb in geolookup-0.6.0

- old
+ new

@@ -116,24 +116,33 @@ @domestic_state_code_to_name ||= Geolookup.load_hash_from_file(STATE_CODE_TO_FULL_FILE).delete_if{|code, abbr| code > DOMESTIC_STATE_CUTOFF} @domestic_state_code_to_name.values end ################################################################### - # self.names + # self.codes_and_names # - # Returns an array of state names + # Returns a hash of state_codes and names # def self.codes_and_names @codes_and_names ||= Geolookup.load_hash_from_file(STATE_CODE_TO_FULL_FILE) end ################################################################### - # self.names + # self.codes_and_abbreviations # - # Returns an array of state names + # Returns a hash of state_codes and abbreviations # def self.codes_and_abbreviations @codes_and_abbreviations ||= Geolookup.load_hash_from_file(STATE_CODE_TO_ABBREVIATION_FILE) + end + + ################################################################### + # self.abbreviations_and_names + # + # Returns a hash of abbreviations and state names + # + def self.abbreviations_and_names + @state_abbreviation_to_name ||= Geolookup.load_hash_from_file(STATE_ABBREVIATION_TO_NAME_FILE) end ################################################################### # self.names #