summaryrefslogtreecommitdiff
path: root/omptagger
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-20 01:26:31 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-20 01:26:31 -0700
commit3f002dd634293f516fbfcf912715727eda05c80c (patch)
tree9e763142a209a0dde8f2388300dd5f70d6bdd9d0 /omptagger
parent05f4f07b2fdc52395bed6505f14ade137812e821 (diff)
downloadomptagger-3f002dd634293f516fbfcf912715727eda05c80c.tar.gz
omptagger-3f002dd634293f516fbfcf912715727eda05c80c.tar.xz
Minor code improvements.
Diffstat (limited to 'omptagger')
-rwxr-xr-xomptagger16
1 files changed, 8 insertions, 8 deletions
diff --git a/omptagger b/omptagger
index e5e4ad3..8ca383d 100755
--- a/omptagger
+++ b/omptagger
@@ -21,10 +21,14 @@ require 'TagLib'
require 'filemagic'
module Output
- @colour = true
+ @@colour = true
+
+ def self.colour=(boolean)
+ @@colour = boolean
+ end
def self.colourise(string, colour)
- return string unless @colour
+ return string unless @@colour
case colour
when :green
@@ -454,10 +458,8 @@ GetoptLong.new(
Output.help_information
when :info
Output.additional_information
- when :scheme
+ when :nocolour, :pretend, :scheme
options[option] = argument
- when :nocolour, :pretend
- options[option] = true
when :viewtag, :removetag
actions << Action.new(option, argument.dup)
when :addtag, :settag
@@ -479,9 +481,7 @@ elsif ARGV.empty?
end
if options[:nocolour]
- module Output
- @colour = false
- end
+ Output.colour = false
end
ARGV.each do |filename|