Skip to content

Instantly share code, notes, and snippets.

@shioyama
Created October 23, 2017 13:14
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 shioyama/43c72fbdafeea26524b3782302caac2f to your computer and use it in GitHub Desktop.
Save shioyama/43c72fbdafeea26524b3782302caac2f to your computer and use it in GitHub Desktop.
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