Method: FilterTable::Factory#add
- Defined in:
- lib/utils/filter.rb
#add(method_name, opts = {}, &block) ⇒ Object
190 191 192 193 194 195 196 197 198 |
# File 'lib/utils/filter.rb', line 190 def add(method_name, opts = {}, &block) if method_name.nil? throw RuntimeError, "Called filter.add for resource #{@resource} with method name nil!" end @connectors[method_name.to_sym] = Connector.new(opts[:field] || method_name, block, opts) self end |