lib/earth/locality/country.rb in earth-0.12.0 vs lib/earth/locality/country.rb in earth-0.12.1
- old
+ new
@@ -1,6 +1,7 @@
require 'earth/automobile'
+require 'earth/fuel'
require 'earth/hospitality'
require 'earth/rail'
class Country < ActiveRecord::Base
self.primary_key = "iso_3166_code"
@@ -44,14 +45,10 @@
def self.united_states
find_by_iso_3166_code('US')
end
- def united_states?
- iso_3166_code == 'US'
- end
-
col :iso_3166_code # alpha-2 2-letter like GB
col :iso_3166_numeric_code, :type => :integer # numeric like 826; aka UN M49 code
col :iso_3166_alpha_3_code # 3-letter like GBR
col :name
col :heating_degree_days, :type => :float
@@ -89,10 +86,9 @@
col :rail_trip_electricity_intensity_units
col :rail_trip_diesel_intensity, :type => :float
col :rail_trip_diesel_intensity_units
col :rail_trip_co2_emission_factor, :type => :float
col :rail_trip_co2_emission_factor_units
-
- warn_if_nulls_except /heating/, /cooling/
-
+
warn_unless_size 249
+ warn_if_nulls_except /heating/, /cooling/
end