Skip to content

Instantly share code, notes, and snippets.

@mlomnicki
Created April 2, 2010 21:41
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 mlomnicki/353761 to your computer and use it in GitHub Desktop.
Save mlomnicki/353761 to your computer and use it in GitHub Desktop.
respond_to? + protected
class A
protected
def foo
end
private
def bar
end
end
puts A.new.respond_to?(:foo)
puts A.new.respond_to?(:bar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment