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: truncate.rb
    path of file: ./repos/asciidoctor/lib/asciidoctor/core_ext/float
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# NOTE remov
    
  def truncate *args
    if args.size == 1
      if (precision = Integer args.shift) == 0
        super
      elsif precision > 0
        precision_factor = 10.0 ** precision
        (self * precision_factor).to_i / precision_factor
      else
        precision_factor = 10 ** precision.abs
        (self / precision_factor).to_i * precision_factor
      end