Sha256: 5a015965ed0ea0a2303ef426dc7ae7826688cf2a6f0931c28835f21b36548515

Contents?: true

Size: 415 Bytes

Versions: 12

Compression:

Stored size: 415 Bytes

Contents

class Sector < ActiveRecord::Base
  extend Earth::Base
  set_primary_key :io_code

  has_many :product_lines_sectors, :class_name => 'ProductLinesSectors', :foreign_key => 'io_code'

  def self.schema_definition
    lambda do
      string 'io_code'
      string 'description'
      float 'emission_factor'
      string 'emission_factor_units'
    end
  end

  data_miner do
    Sector.define_schema(self)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
earth-0.1.4 lib/earth/industry/sector.rb
earth-0.1.3 lib/earth/industry/sector.rb
earth-0.1.2 lib/earth/industry/sector.rb
earth-0.0.43 lib/earth/industry/sector.rb
earth-0.0.42 lib/earth/industry/sector.rb
earth-0.0.41 lib/earth/industry/sector.rb
earth-0.0.40 lib/earth/industry/sector.rb
earth-0.0.39 lib/earth/industry/sector.rb
earth-0.0.38 lib/earth/industry/sector.rb
earth-0.0.37 lib/earth/industry/sector.rb
earth-0.0.36 lib/earth/industry/sector.rb
earth-0.0.35 lib/earth/industry/sector.rb