Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PLU

Price look-up codes made easy

🍉 4032 🍌 4011 🍇 4023

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

Installation

Add this line to your application’s Gemfile:

gem 'plu'

Getting Started

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

Resources

History

View the changelog

Contributing

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

To get started with development:

git clone https://github.com/ankane/plu.git
cd plu
bundle install
bundle exec rake test

About

Price look-up codes made easy

Resources

License

Packages

No packages published

Languages