module Roda::RodaPlugins::CustomMatchers::ClassMethods

  1. lib/roda/plugins/custom_matchers.rb

Methods

Public Instance

  1. custom_matcher

Public Instance methods

custom_matcher(match_class, &block)
[show source]
   # File lib/roda/plugins/custom_matchers.rb
63 def custom_matcher(match_class, &block)
64   custom_matchers = Hash[self.custom_matchers]
65   meth = custom_matchers[match_class] = custom_matchers[match_class] || :"_custom_matcher_#{match_class}"
66   opts[:custom_matchers] = custom_matchers.freeze
67   self::RodaRequest.send(:define_method, meth, &block)
68   nil
69 end