Sha256: 65416e4f990f4a476d3624713b9478d2c37b71cda176a940993e75bf201b8235

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

class AutomobileFuelType < ActiveRecord::Base
  set_primary_key :code
  
  has_many :automobiles, :foreign_key => 'fuel_type_code'
  
  scope :ordered, :order => 'name'
  
  falls_back_on :emission_factor => 20.781.pounds_per_gallon.to(:kilograms_per_litre) # https://brighterplanet.sifterapp.com/projects/30/issues/428
  
  data_miner do
    tap "Brighter Planet's sanitized automobile fuel type data", Earth.taps_server
  end
  
  CODES = {
    :electricity => 'El',
    :diesel => 'D'
  }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
earth-0.3.3 lib/earth/automobile/automobile_fuel_type.rb
earth-0.3.2 lib/earth/automobile/automobile_fuel_type.rb
earth-0.3.1 lib/earth/automobile/automobile_fuel_type.rb
earth-0.3.0 lib/earth/automobile/automobile_fuel_type.rb