class Scan
Scan
class
Public Instance Methods
search_text()
click to toggle source
# File lib/zinbei/rantan.rb, line 12 def search_text File.open(ARGV[1]) do |f| while (str2 = f.gets) str = str2.chomp! three = /#{ARGV[2]}/o str3 = str begin if str3.match(three) || {}[:match] printf('%2d : %s', f.lineno, str) puts '' end rescue StandardError => e puts e.backtrace end end end end