Skip to content

Instantly share code, notes, and snippets.

@rwjblue
Forked from rondale-sc/memoized_helpers.rb
Created May 29, 2013 01:19
Show Gist options
  • Save rwjblue/5667343 to your computer and use it in GitHub Desktop.
Save rwjblue/5667343 to your computer and use it in GitHub Desktop.
def visible?(klass, name)
(klass.public_instance_methods + klass.public_class_methods).any? { |m| m.to_s == name }
end
private :visible?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment