Created
July 22, 2015 09:36
-
-
Save ievgrafov/14b445c1043187cd3fc6 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
def generic_restriction(method_name, attributes) | |
[:define_method, :define_singleton_method].each do |definition_method| | |
send definition_method, method_name do | |
attributes | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment