Method: Interest::Definition.collection_methods_for
- Defined in:
- lib/interest/definition.rb
.collection_methods_for(target) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/interest/definition.rb', line 36 def collection_methods_for(target) Module.new do define_method :of do |*args| where :"#{target}_type" => args.map(&Interest::Utils.method(:source_type_of)) end end end |