Class: Thailand::Country

Inherits:
Region
  • Object
show all
Includes:
Singleton
Defined in:
lib/thailand/country.rb

Instance Attribute Summary

Attributes inherited from Region

#code, #parent

Instance Method Summary collapse

Methods inherited from Region

#<=>, #initialize, #reset!, #subregions, #subregions?, #to_s

Constructor Details

This class inherits a constructor from Thailand::Region

Instance Method Details

#inspectObject



28
29
30
# File 'lib/thailand/country.rb', line 28

def inspect
  "#<#{self.class} name: \"#{name}\", official_name: \"#{official_name}\">"
end

#nameObject



8
9
10
# File 'lib/thailand/country.rb', line 8

def name
  Thailand.i18n_backend.translate 'thailand.name'
end

#official_nameObject



12
13
14
# File 'lib/thailand/country.rb', line 12

def official_name
  Thailand.i18n_backend.translate 'thailand.official_name'
end

#pathObject



24
25
26
# File 'lib/thailand/country.rb', line 24

def path
  'thailand'
end

#subregion_classObject



20
21
22
# File 'lib/thailand/country.rb', line 20

def subregion_class
  Province
end

#subregion_data_pathObject



16
17
18
# File 'lib/thailand/country.rb', line 16

def subregion_data_path
  'region.yml'
end