Created
October 23, 2017 13:14
-
-
Save shioyama/43c72fbdafeea26524b3782302caac2f 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 MyModule < Module | |
def initialize(&block) | |
block.call(self) | |
end | |
end | |
MyModule.new do |mod| | |
puts mod.class | |
end | |
#=> MyModule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment