Created
September 23, 2008 16:50
-
-
Save ratnikov/12332 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
module Foo | |
module_function | |
def make_foo_mod | |
foo_closure = "omgwtfBBQ" | |
Module.new do | |
def foo_class_var; foo_closure end | |
def foo_class_var= stuff; foo_closure = stuff end | |
end | |
end | |
end | |
class Alpha | |
include Foo.make_foo_mod | |
end | |
class Beta | |
include Foo.make_foo_mod | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment