|name|score|
|:---|----:|
|john| 96|
|wang| 88|
| name | score |
|---|
| File.expand_path(File.dirname(__FILE__)) | |
| # If you want to require some files in different directory, in ruby 1.9, you may want to use: | |
| require_relative "../xxxlib" |
| error = catch(:error) do | |
| throw :error, "params uuid required" if uuid.blank? | |
| throw :error, "params lang required" unless params.include?("lang") | |
| end |
File.open("/usr/local/widgets/data").each do |line|
puts line if line =~ /blue/
end
logfile = File.new("/tmp/log", "w")
logfile.close