Module: ActionDispatch::Journey::Route::VerbMatchers
Do not use. This module is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Defined in: | actionpack/lib/action_dispatch/journey/route.rb |
Constant Summary
-
VERBS =
# File 'actionpack/lib/action_dispatch/journey/route.rb', line 15%w{ DELETE GET HEAD OPTIONS LINK PATCH POST PUT TRACE UNLINK }
-
VERB_TO_CLASS =
# File 'actionpack/lib/action_dispatch/journey/route.rb', line 54VERBS.each_with_object(all: All) do |verb, hash| klass = const_get verb hash[verb] = klass hash[verb.downcase] = klass hash[verb.downcase.to_sym] = klass end
Class Method Summary
Class Method Details
.for(verbs)
[ GitHub ]# File 'actionpack/lib/action_dispatch/journey/route.rb', line 65
def self.for(verbs) if verbs.any? { |v| VERB_TO_CLASS[v] == All } All elsif verbs.one? VERB_TO_CLASS[verbs.first] else Or.new(verbs.map { |v| VERB_TO_CLASS[v] }) end end