<commit_before>Hart
====

Hash router

Description
-----------

Hart is a generic routing library that walks a hash and detects
matches according to a given pair of verb and path arguments.

Usage
-----

A basic example would look like this:

```ruby
words = {
  "c" => {
    "o" => {
      "d" => {
        define: "A husk; a pod; as, a peascod.",

        "a" => {
          define: "Concluding passage of a piece or movement."
        },

        "e" => {
          define: "System of rules relating to one subject.",

          "c" => {
            define: "Device that compresses and decompresses data."
          },

          "x" => {
            define: "A book; a manuscript."
          }
        }
      }
    }
  }
}

h = Hart.new(routes)
h.call(:define, "/c/o/d")     #=> "A husk; a pod; as, a peascod."
h.call(:define, "/c/o/d/e")   #=> "System of rules relating to one subject."
h.call(:define, "/c/o/d/e/r") #=> nil<commit_msg>Fix typo in readme example.<commit_after>Hart
====

Hash router

Description
-----------

Hart is a generic routing library that walks a hash and detects
matches according to a given pair of verb and path arguments.

Usage
-----

A basic example would look like this:

```ruby
words = {
  "c" => {
    "o" => {
      "d" => {
        define: "A husk; a pod; as, a peascod.",

        "a" => {
          define: "Concluding passage of a piece or movement."
        },

        "e" => {
          define: "System of rules relating to one subject.",

          "c" => {
            define: "Device that compresses and decompresses data."
          },

          "x" => {
            define: "A book; a manuscript."
          }
        }
      }
    }
  }
}

h = Hart.new(words)
h.call(:define, "/c/o/d")     #=> "A husk; a pod; as, a peascod."
h.call(:define, "/c/o/d/e")   #=> "System of rules relating to one subject."
h.call(:define, "/c/o/d/e/r") #=> nil
{'fraction_non_alphanumeric': 0.16499736425935688, 'fraction_numerical': 0.0, 'mean_word_length': 1.782991202346041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '4834174', 'n_tokens_mistral': 639, 'n_tokens_neox': 615, 'n_words': 209}