lib/barby/barcode/qr_code.rb
#Maximum sizes for each correction level for binary data
#It's an array
Maximum sizes for each correction level for binary data
It's an array
Maximum sizes for each correction level for binary data It ' s an array
def size
      return @size if @size
      level_index = LEVELS[level]
      length = data.bytesize
      found_size = nil
      SIZES.each do |size,max_values|
        if max_values[level_index] >= length
          found_size = size
          break
        end
      end
      found_size
    end
def size return @size if @size level_index = LEVELS [ level ] length = data . bytesize found_size = nil SIZES . each do | size , max_values | if max_values [ level_index ] >= length found_size = size break end end found_size end
Maximum sizes for each correction level for binary data
It's an array
Maximum sizes for each correction level for binary data It ' s an array
#@size is only used for manual override, if it's not set #manually the size is always dynamic, calculated from the #length of the data