Class: Booker::Models::Country
- Defined in:
- lib/booker/models/country.rb
Constant Summary collapse
- NAMES_TO_ISO_CODES =
ISO 3166-1 alpha-2 Codes
YAML::load_file(File.join(__dir__, '..', 'config', 'booker_country_names_to_iso_codes.yml')).freeze
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
Methods inherited from Model
constantize, from_hash, from_list, #initialize, time_from_booker_datetime, time_to_booker_datetime, timezone_from_booker_offset!, timezone_from_booker_timezone, #to_hash, #to_json, to_wday
Constructor Details
This class inherits a constructor from Booker::Models::Model
Instance Method Details
#country_code ⇒ Object
7 |
# File 'lib/booker/models/country.rb', line 7 def country_code; NAMES_TO_ISO_CODES[self.Name]; end |