Skip to content

Instantly share code, notes, and snippets.

@Talleyran
Created October 13, 2011 21:39
Show Gist options
  • Save Talleyran/1285615 to your computer and use it in GitHub Desktop.
Save Talleyran/1285615 to your computer and use it in GitHub Desktop.
module A
def a_xx
end
end
module B
def b_xx
end
end
A.send :include, B
class C
include A
end
puts C.instance_methods.select{|el|el.to_s=~/_xx$/} #a_xx,b_xx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment