File: barcode.md

package info (click to toggle)
ruby-faker 2.21.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,076 kB
  • sloc: ruby: 19,088; makefile: 6
file content (36 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Faker::Barcode

Generates EAN, UPC, ISBN, ISMN, ISSN format barcode with check digit attached at last

```ruby
# EAN barcodes
Faker::Barcode.ean                                      => "85657526"
Faker::Barcode.ean(8)                                   => "30152700"
Faker::Barcode.ean(13)                                  => "2115190480285"

# EAN barcodes with composite string attached in code
Faker::Barcode.ean_with_composite_symbology             => "41007624|JHOC6649"
Faker::Barcode.ean_with_composite_symbology(8)          => "38357961|XUYJ3266"
Faker::Barcode.ean_with_composite_symbology(13)         => "9530722443911|CKHWQHID"

# UPC_A barcodes
Faker::Barcode.upc_a                                    => "766807541831"

# UPC_A barcode with composite symbology attached
Faker::Barcode.upc_a_with_composite_symbology           => "790670155765|JOVG6208"

# UPC_E barcode numbers
Faker::Barcode.upc_e                                    => "03746820"

# UPC_E barcode with composite symbology attached
Faker::Barcode.upc_e_with_composite_symbology           => "05149247|BKZX9722"

# ISBN barcode numbers
Faker::Barcode.isbn                                     => "9798363807732"

# ISMN barcode numbers
Faker::Barcode.ismn                                     => "9790527672897"

# ISSN barcode numbers
Faker::Barcode.issn                                     => "9775541703338"
```