Method: Box::Folder#find
- Defined in:
- lib/box/folder.rb
#find(criteria) ⇒ Array
Note:
The recursive option will call #tree, which can be slow for large folders.
Note:
Any item method (as a symbol) can be used as criteria, which could cause major problems if used improperly.
Search for sub-items using criteria.
TODO: Lookup YARD syntax for options hash.
95 96 97 98 99 100 101 102 |
# File 'lib/box/folder.rb', line 95 def find(criteria) recursive = criteria.delete(:recursive) recursive = false if recursive == nil # default to false for performance reasons tree if recursive # get the full tree find!(criteria, recursive) end |