Sha256: 71309a7154e3331290b237cd86c9b875d8fa997cdad837c747ea71a5f94fb5cf

Contents?: true

Size: 478 Bytes

Versions: 17

Compression:

Stored size: 478 Bytes

Contents

require 'earth/locality/data_miner'
LodgingClass.class_eval do
  data_miner do
    process "Ensure CountryLodgingClass is populated" do
      CountryLodgingClass.run_data_miner!
    end
    
    process "Derive lodging classes from CountryLodgingClass" do
      connection.select_values("SELECT DISTINCT lodging_class_name FROM #{CountryLodgingClass.quoted_table_name}").each do |lodging_class_name|
        find_or_create_by_name lodging_class_name
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
earth-0.12.3 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.12.2 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.12.1 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.12.0 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.20 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.19 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.18 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.17 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.16 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.15 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.14 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.13 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.12 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.11 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.10 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.9 lib/earth/hospitality/lodging_class/data_miner.rb
earth-0.11.8 lib/earth/hospitality/lodging_class/data_miner.rb