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: line.rb
    path of file: ./repos/pre-commit/lib/pre-commit
    
    the code of the file until where you have to start completion: module PreCommit
  class Line < Struct.new :message, :file, :line,
    
    def to_s
      result = message.to_s
      unless empty? file
        result = "#{result}#{"\n" unless empty?(result)}#{file}"
        result = "#{result}:#{line}" unless empty? line
        result = "#{result}:#{code}" unless empty? code
      end