Skip to content

Instantly share code, notes, and snippets.

Created June 5, 2016 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a9a08ce287d6d2dc5781f541479cf032 to your computer and use it in GitHub Desktop.
Save anonymous/a9a08ce287d6d2dc5781f541479cf032 to your computer and use it in GitHub Desktop.
require 'logger'
require 'pp'
class Base
def initialize
@@logger = Logger.new(STDOUT)
end
end
class Helper < Base
def initialize
super()
end
def run
pp @@logger.level
end
end
class Main < Base
def initialize
super()
end
def run
pp @@logger.level
@@logger.level = 'warn'
pp @@logger.level
c = Helper.new
c.run
end
end
p = Main.new
p.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment