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: application.rb
    path of file: ./repos/elasticsearch-rails/elasticsearch-persistence/examples/notes
    
    the code of the file until where you have to start completion: # Licensed to Elasticsearch B.V. under one or more contributor
# license agree
    
  def tags; attributes.tags || []; end

  def to_hash
    @attributes.to_hash
  end

  def __extract_tags
    tags = attributes['text'].scan(/(\[\w+\])/).flatten if attributes['text']
    unless tags.nil? || tags.empty?
      attributes.update 'tags' => tags.map { |t| t.tr('[]', '') }
      attributes['text'].gsub!(/(\[\w+\])/, '').strip!
    end
  end