lib/ackr/search.rb
# Public:
#
# search_term - The String to look for.
#               This param could be a 'real' string or a String
#               representing a regexp. If the string looks like
#               a regexp, it will be treated like a regexp.
#
# Examples:
#   Search.new("abc")
#   Search.new("/abc/i")
The String to look for.
This param could be a 'real' string or a String
representing a regexp. If the string looks like
a regexp, it will be treated like a regexp.


The String to look for . This param could be a ' real ' string or a String representing a regexp . If the string looks like a regexp it will be treated like a regexp .
def search_into_line line
        begin
          if @search_term.is_a?(String)
            line.downcase.include?(@search_term)
          else
            @search_term =~ line
          end
        rescue
        end
      end
def search_into_line line begin if @search_term . is_a? ( String ) line . downcase . include? ( @search_term ) else @search_term =~ line end rescue end end
Public:
search_term - The String to look for.
Public : search_term - The String to look for .
line
<not_specific>