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: column.rb
    path of file: ./repos/hitobito/app/domain/table_displays
    
    the code of the file until where you have to start completion: #  Copyright (c) 2012-2018, Schw
    
    def value_for(object, attr)
      target, target_attr = resolve(object, attr)
      if target.present? && target_attr.present? && allowed?(target, target_attr, object, attr)
        return target, target_attr unless block_given?

        yield target, target_attr
      end