<commit_before>module Hyperclient
  # Internal: Discovers resources from an HTTP response.
  class Discoverer
    # Public: Initializes a Discoverer.
    #
    # response - A Hash representing an HTTP response of a resource.
    def initialize(response)
      @response = response
    end

    # Public: Returns a collection of Hyperclient::Resource extracted from the
    # _links response.
    def links
      discover_resources_from(@response['_links'])
    end

    # Public: Returns a collection of Hyperclient::Resource extracted from the
    # _embedded response.
    def embedded
      discover_resources_from(@response['_embedded'])<commit_msg>Add naive caching to discoverer<commit_after>module Hyperclient
  # Internal: Discovers resources from an HTTP response.
  class Discoverer
    # Public: Initializes a Discoverer.
    #
    # response - A Hash representing an HTTP response of a resource.
    def initialize(response)
      @response = response
    end

    # Public: Returns a collection of Hyperclient::Resource extracted from the
    # _links response.
    def links
      @links ||= discover_resources_from(@response['_links'])
    end

    # Public: Returns a collection of Hyperclient::Resource extracted from the
    # _embedded response.
    def embedded
      @embedded ||= discover_resources_from(@response['_embedded'])
{'fraction_non_alphanumeric': 0.06968124536693847, 'fraction_numerical': 0.0, 'mean_word_length': 3.485049833887043, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1336544', 'n_tokens_mistral': 351, 'n_tokens_neox': 336, 'n_words': 123}