You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: chars.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/mail-2.6.5/lib/mail/multibyte
    
    the code of the file until where you have to start completion: # encoding: utf-8
# frozen_string_literal: true

module Mail #:nodoc:
  module Multibyte #:nodoc:
    # Chars enables you to work transparently with UTF-8 encoding in the Ruby String class without having extensive
    # knowledge about the encoding. A
    
        def justify(integer, way, padstr=' ') #:nodoc:
          raise ArgumentError, "zero width padding" if padstr.length == 0
          padsize = integer - size
          padsize = padsize > 0 ? padsize : 0
          case way
          when :right
            result = @wrapped_string.dup.insert(0, padding(padsize, padstr))
          when :left
            result = @wrapped_string.dup.insert(-1, padding(padsize, padstr))
          when :center
            lpad = padding((padsize / 2.0).floor, padstr)
            rpad = padding((padsize / 2.0).ceil, padstr)
            result = @wrapped_string.dup.insert(0, lpad).insert(-1, rpad)
          end