Module: Searchable Private
- Included in:
- Cask::Cask, DescriptionCacheStore
- Defined in:
- Library/Homebrew/searchable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Helper module for making a class searchable with both regular expressions and strings.
Instance Method Summary collapse
Instance Method Details
#search(string_or_regex, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 14 15 |
# File 'Library/Homebrew/searchable.rb', line 8 def search(string_or_regex, &block) case string_or_regex when Regexp search_regex(string_or_regex, &block) else search_string(string_or_regex.to_str, &block) end end |