Module: MundaneSearch::Filters::Shortcuts
- Included in:
- Builder
- Defined in:
- lib/mundane-search/filters/shortcuts.rb
Instance Method Summary collapse
Instance Method Details
#employ(shortcut, options = {}, &block) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/mundane-search/filters/shortcuts.rb', line 6 def employ(shortcut, = {}, &block) filter_name, = filter_for(shortcut) filter = "#{filter_name}".safe_constantize raise "No filter found for #{shortcut}" unless filter [].flatten.each do |opts| use filter, .merge(opts), &block end end |