From 390f2786509206022057260fe2daaec128f0ea88 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 28 Sep 2010 03:51:21 -0700 Subject: Some minor aesthetic improvements. --- lognotify.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lognotify.rb') diff --git a/lognotify.rb b/lognotify.rb index c3ff293..f6ad65a 100755 --- a/lognotify.rb +++ b/lognotify.rb @@ -14,8 +14,8 @@ def parse identifier conf = Hash.new file = File.expand_path(CONFIG_DIR + '/' + identifier + '.conf') - File.open(file) do |io| - io.each_line do |line| + File.open(file) do |read| + read.each_line do |line| # Remove whitespace from beginning of line, allowing for indentation. line.lstrip! @@ -24,7 +24,7 @@ def parse identifier key, value = line.split('=', 2) # Raise an error if line does not contain a key/value pair. - raise 'Check line ' + io.lineno.to_s + ' for errors.' if value.nil? + raise 'Check line ' + read.lineno.to_s + ' for errors.' if value.nil? conf[key.strip.to_sym] = value.strip end -- cgit v1.2.3-70-g09d2