3
3
module Faker
4
4
class Barcode < Base
5
5
class << self
6
- ## Returns a EAN 8 or 13 digit format barcode number with check digit
6
+ ##
7
+ # Returns a EAN 8 or 13 digit format barcode number with check digit
7
8
# @return [String]
8
9
#
9
10
# @example
@@ -16,7 +17,8 @@ def ean(length = 8)
16
17
generate_barcode ( "barcode.ean_#{ Integer ( length ) } " )
17
18
end
18
19
19
- ## Returns a EAN 8 or 13 digit format barcode number with composite string attached with check digit
20
+ ##
21
+ # Returns a EAN 8 or 13 digit format barcode number with composite string attached with check digit
20
22
# @return [String]
21
23
#
22
24
# @example
@@ -29,7 +31,8 @@ def ean_with_composite_symbology(length = 8)
29
31
"#{ ean ( length ) } |#{ bothify ( parse ( 'barcode.composite_symbol' ) ) } "
30
32
end
31
33
32
- ## Returns a UPC_A format barcode number with check digit
34
+ ##
35
+ # Returns a UPC_A format barcode number with check digit
33
36
# @return [String]
34
37
#
35
38
# @example
@@ -40,7 +43,8 @@ def upc_a
40
43
generate_barcode ( 'barcode.upc_a' )
41
44
end
42
45
43
- ## Returns a UPC_E format barcode number with check digit
46
+ ##
47
+ # Returns a UPC_E format barcode number with check digit
44
48
# @return [String]
45
49
#
46
50
# @example
@@ -51,7 +55,8 @@ def upc_e
51
55
generate_barcode ( 'barcode.upc_e' )
52
56
end
53
57
54
- ## Returns a UPC_A format barcode number with composite string attached with check digit
58
+ ##
59
+ # Returns a UPC_A format barcode number with composite string attached with check digit
55
60
# @return [String]
56
61
#
57
62
# @example
@@ -62,7 +67,8 @@ def upc_a_with_composite_symbology
62
67
"#{ upc_a } |#{ bothify ( parse ( 'barcode.composite_symbol' ) ) } "
63
68
end
64
69
65
- ## Returns a UPC_E format barcode number with composite string attached with check digit
70
+ ##
71
+ # Returns a UPC_E format barcode number with composite string attached with check digit
66
72
# @return [String]
67
73
#
68
74
# @example
@@ -73,7 +79,8 @@ def upc_e_with_composite_symbology
73
79
"#{ upc_e } |#{ bothify ( parse ( 'barcode.composite_symbol' ) ) } "
74
80
end
75
81
76
- ## Returns a ISBN format barcode number with check digit
82
+ ##
83
+ # Returns a ISBN format barcode number with check digit
77
84
# @return [String]
78
85
#
79
86
# @example
@@ -84,7 +91,8 @@ def isbn
84
91
generate_barcode ( 'barcode.isbn' )
85
92
end
86
93
87
- ## Returns a ISMN format barcode number with check digit
94
+ ##
95
+ # Returns a ISMN format barcode number with check digit
88
96
# @return [String]
89
97
#
90
98
# @example
@@ -95,7 +103,8 @@ def ismn
95
103
generate_barcode ( 'barcode.ismn' )
96
104
end
97
105
98
- ## Returns a ISSN format barcode number with check digit
106
+ ##
107
+ # Returns a ISSN format barcode number with check digit
99
108
# @return [String]
100
109
#
101
110
# @example
@@ -114,7 +123,8 @@ def generate_barcode(key)
114
123
"#{ barcode } #{ check_digit } "
115
124
end
116
125
117
- ## Returns the sum of even and odd numbers from value passed
126
+ ##
127
+ # Returns the sum of even and odd numbers from value passed
118
128
#
119
129
# @return [Array]
120
130
#
@@ -137,7 +147,8 @@ def sum_even_odd(fake_num)
137
147
[ sum_odd , sum_even ]
138
148
end
139
149
140
- ## Generates the check digits from sum passed
150
+ ##
151
+ # Generates the check digits from sum passed
141
152
#
142
153
# @return [Integer]
143
154
#
0 commit comments