module Slugity::Matchers

Public Class Methods

add(key, use_default=true, options={}) click to toggle source

add a matcher hash @param key [Symbol] @param use_default [Boolean] @param options [Hash]

# File lib/slugity/matchers.rb, line 18
def self.add key, use_default=true, options={}
  if use_default
    options = @@matchers[:default].merge(options)
  end
  @@matchers[key] = options
end
use(key) click to toggle source

fetch a matcher @param key [Symbol] @return [Hash]

# File lib/slugity/matchers.rb, line 10
def self.use key
  @@matchers[key]
end