Method: RubyCurses::TextView#find_first_match
- Defined in:
- lib/rbcurse/core/widgets/rtextview.rb
#find_first_match(regex) ⇒ Object
returns row of first match of given regex (or nil if not found)
193 194 195 196 197 198 |
# File 'lib/rbcurse/core/widgets/rtextview.rb', line 193 def find_first_match regex #:nodoc: @list.each_with_index do |row, ix| return ix if !row.match(regex).nil? end return nil end |