Skip to content

Instantly share code, notes, and snippets.

@deepak
Created April 14, 2015 10:46
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 deepak/584bbd7e44060c0e67f1 to your computer and use it in GitHub Desktop.
Save deepak/584bbd7e44060c0e67f1 to your computer and use it in GitHub Desktop.
including a module as private in ruby, does not change anything
# including a module as private in ruby, does not change anything
# to test
mixin_methods = Mixin.instance_methods
controller = SomeController.new
status = mixin_methods.each_with_object({}) { |x, acc| acc[x] = controller.respond_to?(x) }
status.select { |k,v| !v }.keys # will be empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment