lib/mongoid/contextual/command.rb
def selecting(param)
        begin
          fields = command[param]
          Threaded.set_selection(criteria.object_id, fields) unless fields.blank?
          yield
        ensure
          Threaded.delete_selection(criteria.object_id)
        end
      end
# Execute the block setting field limitations.
#
# @api private
#
# @example Execute with field limitations.
#   text_search.selecting do
#     #...
#   end
#
# @param [ Symbol ] param The name of the command parameter.
#
# @return [ Object ] The result of the yield.
#
# @since 4.0.0
Execute the block setting field limitations.
Execute the block setting field limitations .
def selecting(param)
        begin
          fields = command[param]
          Threaded.set_selection(criteria.object_id, fields) unless fields.blank?
          yield
        ensure
          Threaded.delete_selection(criteria.object_id)
        end
      end
def selecting ( param ) begin fields = command [ param ] Threaded . set_selection ( criteria . object_id , fields ) unless fields . blank? yield ensure Threaded . delete_selection ( criteria . object_id ) end end
Execute the block setting field limitations.
Execute the block setting field limitations .
The result of the yield.
The result of the yield .
 Object 
param
param The name of the command parameter.
param The name of the command parameter .
api
None
example
Execute with field limitations. text_search.selecting do #... end
Execute with field limitations . text_search . selecting do # ... end
since
None