Sha256: 0e952438be7c9c8f9e52e2e0f06d8bb782bd439f10fc46f30ef2043a921168cc

Contents?: true

Size: 444 Bytes

Versions: 17

Compression:

Stored size: 444 Bytes

Contents

= Fuzzy Hash

This is useful when you want to have a lookup table that can either contain strings or regexes.
For instance, you might want a catch all for certain regexes that perform a certain logic.

  >> hash = FuzzyHash.new
  >> hash[/^\d+$/] = 'number'
  >> hash[/.*/] = 'something'
  >> hash['chunky'] = 'bacon'
  >> hash['foo'] = 'vader'
  
  >> hash['foo']
  << 'vader'
  >> hash['food']
  << 'something'
  >> hash['123']
  << 'number'

Version data entries

17 entries across 17 versions & 4 rubygems

Version Path
joshbuddy-fuzzy_hash-0.0.1 README.rdoc
joshbuddy-fuzzy_hash-0.0.2 README.rdoc
joshbuddy-fuzzy_hash-0.0.3 README.rdoc
joshbuddy-fuzzyhash-0.0.4 README.rdoc
joshbuddy-fuzzyhash-0.0.5 README.rdoc
joshbuddy-fuzzyhash-0.0.6 README.rdoc
joshbuddy-fuzzyhash-0.0.7 README.rdoc
fuzzyhash-0.0.11 README.rdoc
fuzzyhash-0.0.10 README.rdoc
fuzzyhash-0.0.9 README.rdoc
fuzzyhash-0.0.8 README.rdoc
fuzzyhash-0.0.7 README.rdoc
fuzzyhash-0.0.6 README.rdoc
fuzzyhash-0.0.3 README.rdoc
fuzzyhash-0.0.4 README.rdoc
fuzzyhash-0.0.5 README.rdoc
fuzzy_hash-0.0.3 README.rdoc