Sha256: 683dc8df4980e02f6bbea48768d19b81ca06e56f8b237eae69ad27ad80c05b59
Contents?: true
Size: 447 Bytes
Versions: 20
Compression:
Stored size: 447 Bytes
Contents
require_relative 'url_tokenizer/provider' require 'facets/hash/symbolize_keys' module UrlTokenizer Error = Class.new StandardError class << self def provider(name) providers.fetch(name.to_sym) do raise Error, "unknown provider '#{ name }'" end end def register(provider_hash) providers.merge! provider_hash.symbolize_keys end private def providers @providers ||= {} end end end
Version data entries
20 entries across 20 versions & 1 rubygems