Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refactored Growl::Base.switch
  • Loading branch information
tj committed Apr 9, 2009
1 parent 0918ad9 commit 6aabd4d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/growl/growl.rb
Expand Up @@ -124,8 +124,7 @@ def run
def self.switch name
ivar = :"@#{name}"
(@switches ||= []) << name
define_method(:"#{name}") { instance_variable_get(ivar) }
define_method(:"#{name}=") { |value| instance_variable_set(ivar, value) }
attr_accessor :"#{name}"
define_method(:"#{name}?") { !! instance_variable_get(ivar) }
define_method(:"#{name}!") { instance_variable_set(ivar, true) }
end
Expand Down

0 comments on commit 6aabd4d

Please sign in to comment.