Method: Doing::Plugins.plugin_regex
- Defined in:
- lib/doing/plugin_manager.rb
.plugin_regex(type: :export) ⇒ Regexp
Return a regular expression of all plugin triggers for type
178 179 180 181 182 183 184 185 |
# File 'lib/doing/plugin_manager.rb', line 178 def plugin_regex(type: :export) type = valid_type(type) pattern = [] plugins[type].each do |_, | pattern << [:trigger].normalize_trigger end Regexp.new("^(?:#{pattern.join('|')})$", true) end |