Sha256: 55e8933a0daefd517c6c78d7ad147fc519169cf0071cee33aa0c2f5982c01f8c

Contents?: true

Size: 600 Bytes

Versions: 28

Compression:

Stored size: 600 Bytes

Contents

BreedGender.class_eval do
  data_miner do
    import "Brighter Planet's list of cat and dog breeds, genders, and weights",
           :url => 'http://static.brighterplanet.com/science/data/consumables/pets/breed_genders.csv',
           :encoding => 'ISO-8859-1',
           :select => lambda { |row| row['gender'].present? } do
      key 'name', :synthesize => lambda { |row| row['name'] + ' ' + row['gender'] }
      store 'breed_name', :field_name => 'name'
      store 'gender_name', :field_name => 'gender'
      store 'weight', :from_units => :pounds, :to_units => :kilograms
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
earth-0.11.16 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.15 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.14 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.13 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.12 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.11 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.10 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.9 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.8 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.7 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.6 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.5 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.4 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.3 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.2 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.1 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.0 lib/earth/pet/breed_gender/data_miner.rb
earth-0.7.0 lib/earth/pet/breed_gender/data_miner.rb
earth-0.6.6 lib/earth/pet/breed_gender/data_miner.rb
earth-0.6.5 lib/earth/pet/breed_gender/data_miner.rb