<commit_before>class Shrine
  module Plugins
    # The `metadata_attributes` plugin allows you to sync attachment metadata
    # to additional record attributes.
    #
    #     plugin :metadata_values
    #
    # It provides `Attacher.metadata_attributes` method which allows you to
    # specify mappings between metadata fields on the attachment and attribute
    # names on the record.
    #
    #     Attacher.metadata_attributes :size => :size, :mime_type => :type
    #
    # The above configuration will sync `size` metadata field to
    # `<attachment>_size` record attribute, and `mime_type` metadata field to
    # `<attachment>_type` record attribute.
    #
    #     user.avatar = image
    #     user.avatar.metadata["size"]      #=> 95724
    #     user.avatar_size                  #=> 95724
    #     user.avatar.metadata["mime_type"] #=> "image/jpeg"
    #     user.avatar_type                  #=> "image/jpeg"
    #
    #     user.avatar = nil<commit_msg>Fix typo in Plugins::MetadataAttributes docs<commit_after>class Shrine
  module Plugins
    # The `metadata_attributes` plugin allows you to sync attachment metadata
    # to additional record attributes.
    #
    #     plugin :metadata_attributes
    #
    # It provides `Attacher.metadata_attributes` method which allows you to
    # specify mappings between metadata fields on the attachment and attribute
    # names on the record.
    #
    #     Attacher.metadata_attributes :size => :size, :mime_type => :type
    #
    # The above configuration will sync `size` metadata field to
    # `<attachment>_size` record attribute, and `mime_type` metadata field to
    # `<attachment>_type` record attribute.
    #
    #     user.avatar = image
    #     user.avatar.metadata["size"]      #=> 95724
    #     user.avatar_size                  #=> 95724
    #     user.avatar.metadata["mime_type"] #=> "image/jpeg"
    #     user.avatar_type                  #=> "image/jpeg"
    #
    #     user.avatar = nil
{'fraction_non_alphanumeric': 0.0947103274559194, 'fraction_numerical': 0.010075566750629723, 'mean_word_length': 2.4781085814360773, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3387858', 'n_tokens_mistral': 587, 'n_tokens_neox': 555, 'n_words': 159}