barcode1dtools 1.0.0.0 → 1.0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -455,9 +455,9 @@ module Barcode1DTools
455
455
 
456
456
  @options = DEFAULT_OPTIONS.merge(options)
457
457
 
458
- if options[:raw_value]
458
+ if @options[:raw_value]
459
459
  @encoded_string = value
460
- @value = self.class.code128_to_latin1(value, options)
460
+ @value = self.class.code128_to_latin1(value, @options)
461
461
  else
462
462
  if value.is_a?(Array)
463
463
  @value = value
@@ -481,7 +481,7 @@ module Barcode1DTools
481
481
  end
482
482
  end
483
483
  raise UnencodableCharactersError unless self.class.can_encode?(value)
484
- @encoded_string = self.class.latin1_to_code128(@value, options)
484
+ @encoded_string = self.class.latin1_to_code128(@value, @options)
485
485
  end
486
486
 
487
487
  md = self.class.parse_code128(@encoded_string)
@@ -430,7 +430,7 @@ module Barcode1DTools
430
430
  @value, @check_digit = md[1], md[2]
431
431
  else
432
432
  @value = value
433
- if options[:force_full_ascii] || self.class.requires_full_ascii?(value)
433
+ if @options[:force_full_ascii] || self.class.requires_full_ascii?(value)
434
434
  @full_ascii_value = self.class.encode_full_ascii(value)
435
435
  @full_ascii = true
436
436
  @check_digit = self.class.generate_check_digit_for(@full_ascii_value)
@@ -220,12 +220,12 @@ module Barcode1DTools
220
220
  @value = value.to_s
221
221
  @check_digit = nil
222
222
  elsif @options[:checksum_included]
223
- raise ChecksumError unless self.class.validate_check_digit_for(value, options)
223
+ raise ChecksumError unless self.class.validate_check_digit_for(value, @options)
224
224
  @encoded_string = value.to_s
225
- @value, @check_digit = self.class.split_payload_and_check_digits(value, options)
225
+ @value, @check_digit = self.class.split_payload_and_check_digits(value, @options)
226
226
  else
227
227
  @value = value.to_s
228
- @check_digit = self.class.generate_check_digit_for(@value, options)
228
+ @check_digit = self.class.generate_check_digit_for(@value, @options)
229
229
  @encoded_string = "#{@value}#{@check_digit}"
230
230
  end
231
231
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barcode1dtools
3
3
  version: !ruby/object:Gem::Version
4
- hash: 95
4
+ hash: 91
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
+ - 1
9
10
  - 0
10
- - 0
11
- version: 1.0.0.0
11
+ version: 1.0.1.0
12
12
  platform: ruby
13
13
  authors:
14
14
  - Michael Chaney