Project

plu

0.03
Low commit activity in last 3 years
A long-lived project that still receives updates
Price look-up codes made easy
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

PLU

Price look-up codes made easy

๐Ÿ‰ 4032 ๐ŸŒ 4011 ๐Ÿ‡ 4023

Data cleaned up from the International Federation of Produce Standards

Build Status

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.

4011 - Bananas ๐ŸŒ 94011 - Organic bananas ๐ŸŒ

PLU.new(94011).organic? # true

Retailer Assigned

PLU.new(3170).retailer_assigned? # true

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