Skip to content

Instantly share code, notes, and snippets.

@shioyama
Created October 23, 2017 13:14
Show Gist options
  • 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