class BarcodeValidation::InvalidGTIN

Public Class Methods

new(input, error: nil) click to toggle source
Calls superclass method
# File lib/barcodevalidation/invalid_gtin.rb, line 7
def initialize(input, error: nil)
  @error = error
  super(input)
end

Public Instance Methods

error_message() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 20
def error_message
  return @error.message if @error.respond_to? :message

  @error.inspect
end
inspect() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 16
def inspect
  %(#<#{self.class} input=#{super} error="#{error_message}">)
end
to_all_valid() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 26
def to_all_valid
  []
end
to_gtin_12() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 34
def to_gtin_12
  self
end
to_gtin_13() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 38
def to_gtin_13
  self
end
to_gtin_14() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 42
def to_gtin_14
  self
end
to_gtin_8() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 30
def to_gtin_8
  self
end
valid?() click to toggle source
# File lib/barcodevalidation/invalid_gtin.rb, line 12
def valid?
  false
end