Class: PetroleumAdministrationForDefenseDistrict
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- PetroleumAdministrationForDefenseDistrict
- Extended by:
- Earth::Model
- Defined in:
- lib/earth/locality/petroleum_administration_for_defense_district.rb
Constant Summary collapse
- TABLE_STRUCTURE =
"\nCREATE TABLE petroleum_districts\n (\n code CHARACTER VARYING(255) NOT NULL PRIMARY KEY,\n district_code CHARACTER VARYING(255),\n district_name CHARACTER VARYING(255),\n subdistrict_code CHARACTER VARYING(255),\n subdistrict_name CHARACTER VARYING(255)\n );\n\n"
Instance Method Summary collapse
Methods included from Earth::Model
extend_mining, extended, registry
Instance Method Details
#name ⇒ Object
22 23 24 25 26 |
# File 'lib/earth/locality/petroleum_administration_for_defense_district.rb', line 22 def name str = "PAD District #{district_code} (#{district_name})" str << " Subdistrict #{district_code}#{subdistrict_code} (#{subdistrict_name})" if subdistrict_code str end |