Class: FuelType

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
Earth::Model
Defined in:
lib/earth/fuel/fuel_type.rb

Overview

DEPRECATED but FuelPurchase still uses this

Constant Summary collapse

TABLE_STRUCTURE =
<<-EOS

CREATE TABLE fuel_types
  (
     name                          CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     emission_factor               FLOAT,
     emission_factor_units         CHARACTER VARYING(255),
     density                       FLOAT,
     density_units                 CHARACTER VARYING(255),
     average_purchase_volume       FLOAT,
     average_purchase_volume_units CHARACTER VARYING(255)
  );

EOS

Instance Method Summary collapse

Methods included from Earth::Model

extend_mining, extended, registry

Instance Method Details

#priceObject



35
36
37
# File 'lib/earth/fuel/fuel_type.rb', line 35

def price
  prices.average :price
end