Price look-up codes made easy
Branch: master
Clone or download
Latest commit b6caef7 Mar 11, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Updated style Mar 11, 2015
test Updated style Mar 11, 2015
.gitignore First commit Sep 18, 2013
Gemfile Updated style Mar 11, 2015
LICENSE.txt First commit Sep 18, 2013
README.md Added retailer_assigned? method Dec 31, 2013
Rakefile Updated style Mar 11, 2015
plu.gemspec Updated style Mar 11, 2015
plu_codes.csv fix description for red bell pepper Sep 24, 2013

README.md

PLU

Price look-up codes made easy

🍉 4032 🍌 4011 🍇 4023

Download PLU codes - data cleaned up from the Produce Marketing Association

How To Use

List known PLUs

PLU.all

Get name from PLU

PLU.new(4011).name # Bananas

Check if valid

PLU.new(2000).valid? # false

5-Digit PLUs

For PLUs with 5 digits, the first digit has a special meaning: 9 specifies organic, and 8 specifies genetically modified.

4011 - Bananas 🍌 94011 - Organic bananas 🍌 84011 - Genetically modified bananas

PLU.new(94011).organic? # true
PLU.new(84011).gm?      # true

Retailer Assigned

PLU.new(3170).retailer_assigned? # true

Installation

Add this line to your Gemfile:

gem "plu"

And run:

bundle

TODO

  • clean up data

Resources

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: