Sha256: 2172316e27da90d21fd7d0af29cf9152ce371b0701a6a1baf05455db2583738d

Contents?: true

Size: 536 Bytes

Versions: 5

Compression:

Stored size: 536 Bytes

Contents

class PetroleumAdministrationForDefenseDistrict < ActiveRecord::Base
  self.primary_key = "code"
  self.table_name = :petroleum_districts
  
  def name
    str = "PAD District #{district_code} (#{district_name})"
    str << " Subdistrict #{district_code}#{subdistrict_code} (#{subdistrict_name})" if subdistrict_code
    str
  end
  
  col :code
  col :district_code
  col :district_name
  col :subdistrict_code
  col :subdistrict_name

  warn_if_nulls_except(
    :subdistrict_code,
    :subdistrict_name
  )

  warn_unless_size 7
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
earth-0.12.4 lib/earth/locality/petroleum_administration_for_defense_district.rb
earth-0.12.3 lib/earth/locality/petroleum_administration_for_defense_district.rb
earth-0.12.2 lib/earth/locality/petroleum_administration_for_defense_district.rb
earth-0.12.1 lib/earth/locality/petroleum_administration_for_defense_district.rb
earth-0.12.0 lib/earth/locality/petroleum_administration_for_defense_district.rb