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 =
<<-EOS CREATE TABLE petroleum_districts ( code CHARACTER VARYING(255) NOT NULL PRIMARY KEY, district_code CHARACTER VARYING(255), district_name CHARACTER VARYING(255), subdistrict_code CHARACTER VARYING(255), subdistrict_name CHARACTER VARYING(255) ); EOS
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 |