Sha256: 34ffd7849e58c8bff3ac3c347ba5bc4e5a8c5349c6981b321d51dffcb98a8308
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
# PLU [Price look-up codes](https://en.wikipedia.org/wiki/Price_look-up_code) made easy :watermelon: 4032 :banana: 4011 :grapes: 4023 Data cleaned up from the [International Federation of Produce Standards](https://www.ifpsglobal.com/) [](https://github.com/ankane/plu/actions) ## Installation Add this line to your application’s Gemfile: ```ruby gem "plu" ``` ## Getting Started List known PLUs ```ruby PLU.all ``` Get name from PLU ```ruby PLU.new(4011).name # Bananas ``` Check if valid ```ruby 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 :banana: 94011 - Organic bananas :banana: ```ruby PLU.new(94011).organic? # true ``` ### Retailer Assigned ```ruby PLU.new(3170).retailer_assigned? # true ``` ## History View the [changelog](https://github.com/ankane/plu/blob/master/CHANGELOG.md) ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: - [Report bugs](https://github.com/ankane/plu/issues) - Fix bugs and [submit pull requests](https://github.com/ankane/plu/pulls) - Write, clarify, or fix documentation - Suggest or add new features - Help clean up [data](https://github.com/ankane/plu/blob/master/plu_codes.csv) To get started with development: ```sh git clone https://github.com/ankane/plu.git cd plu bundle install bundle exec rake test ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
plu-0.2.0 | README.md |