Module: Searchable

Included in:
Cask::Cask, DescriptionCacheStore
Defined in:
brew/Library/Homebrew/searchable.rb

Instance Method Summary collapse

Instance Method Details

#search(string_or_regex, &block) ⇒ Object



4
5
6
7
8
9
10
11
# File 'brew/Library/Homebrew/searchable.rb', line 4

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