<commit_before>require "active_resource"

module Freesound
  module Collections
    class Base < ActiveResource::Collection
      def initialize(parsed={})
        @elements = parsed.fetch(collection_key)
      end
    end

    class Sounds < Base
      def collection_key
        "sounds"
      end
    end

    class Packs < Base
      def collection_key
        "packs"<commit_msg>add some documentation around collections<commit_after>require "active_resource"

module Freesound
  module Collections
    # Collections are required to tell ActiveResource how to parse JSON
    # responses that wrap a collection of resources.
    #
    # The #collection_key method provides the JSON key that will contain the
    # resource data.
    #
    class Base < ActiveResource::Collection
      def initialize(parsed={})
        @elements = parsed.fetch(collection_key)
      end
    end

    class Sounds < Base
      def collection_key
        "sounds"
      end
    end

    class Packs < Base
      def collection_key
        "packs"
{'fraction_non_alphanumeric': 0.055286129970902036, 'fraction_numerical': 0.0, 'mean_word_length': 2.5463917525773194, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '5974413', 'n_tokens_mistral': 269, 'n_tokens_neox': 266, 'n_words': 91}