Last active
December 20, 2016 02:14
-
-
Save thiagoa/bcef9b3d054be440057e17606cad95d1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ModuleFactory < Module | |
def initialize | |
define_a_method | |
end | |
private | |
def define_a_method | |
module_eval do | |
def my_method | |
# Do something... | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment