-
-
Save anonymous/4396cac10346782ede8e9aa2bb279690 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
class YesImAClass | |
@how_we_usually_do_it="blah" | |
def active_overlay | |
@active_overlay ||= (some_method_to_determine_value(...)) ? 'opton 1' : 'option 2' | |
end | |
def self.some_method | |
AnotherClass.foo(@active_overlay) | |
end | |
end | |
# Call YesImAClass.some_method and @active_overlay goes from not set to set | |
# Call YesImAClass.some_method and @active_overlay is already set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment