Created
June 5, 2016 22:39
-
-
Save anonymous/a9a08ce287d6d2dc5781f541479cf032 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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