Sha256: 63dbd9e1bfbea1bff7753f82d891bf58b8c233e9602889be6732643993b47d7a

Contents?: true

Size: 692 Bytes

Versions: 6

Compression:

Stored size: 692 Bytes

Contents

class Carrier < ActiveRecord::Base
  set_primary_key :name
  
  has_many :carrier_modes, :foreign_key => 'carrier_name', :primary_key => 'name'
  
  # TODO calculate these
  falls_back_on :route_inefficiency_factor => 1.03,# Carrier.weighted_average(:route_inefficiency_factor, :weighted_by => :package_volume)
                :transport_emission_factor => 0.0005266,# Carrier.weighted_average(:transport_emission_factor, :weighted_by => :package_volume)
                :corporate_emission_factor => 0.221# Carrier.weighted_average(:corporate_emission_factor, :weighted_by => :package_volume)
  
  data_miner do
    tap "Brighter Planet's shipping company data", Earth.taps_server
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
earth-0.3.15 lib/earth/shipping/carrier.rb
earth-0.3.14 lib/earth/shipping/carrier.rb
earth-0.3.13 lib/earth/shipping/carrier.rb
earth-0.3.11 lib/earth/shipping/carrier.rb
earth-0.3.10 lib/earth/shipping/carrier.rb
earth-0.3.9 lib/earth/shipping/carrier.rb