It has been a long time since I used ruby โโfor such things, but I forgot how to open the file, look for a line and print what ruby โโfinds. Here is what I have:
#!/usr/bin/env ruby f = File.new("file.txt") text = f.read if text =~ /string/ then puts test end
I want to determine that the "document root" (routes) is in config / routes.rb
If I print a line, it prints the file.
It seems to me that I do not remember what it is, but I need to know.
Hope I can do this:
user1428227
source share