Sha256: 2fe22f3b15124842f5867a6ba42c90cb9e17049413e083a4e0686ce511f53c5c

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

class AutomobileTypeFuel < ActiveRecord::Base
  self.primary_key = "name"
  
  # for calculating vehicles
  def latest_activity_year_type_fuel
    AutomobileActivityYearTypeFuel.latest.where(:type_name => type_name, :fuel_family => fuel_family).first
  end
  
  col :name
  col :type_name
  col :fuel_family
  col :annual_distance, :type => :float
  col :annual_distance_units
  col :fuel_consumption, :type => :float
  col :fuel_consumption_units
  col :ch4_emission_factor, :type => :float
  col :ch4_emission_factor_units
  col :n2o_emission_factor, :type => :float
  col :n2o_emission_factor_units
  col :vehicles, :type => :float
  
  warn_unless_size 4
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.12.4 lib/earth/automobile/automobile_type_fuel.rb
earth-0.12.3 lib/earth/automobile/automobile_type_fuel.rb
earth-0.12.2 lib/earth/automobile/automobile_type_fuel.rb