Skip to content

Instantly share code, notes, and snippets.

@rohitkadam19
Last active December 15, 2015 00:19
Show Gist options
  • Save rohitkadam19/5171855 to your computer and use it in GitHub Desktop.
Save rohitkadam19/5171855 to your computer and use it in GitHub Desktop.
How protected work in ruby
class Test
def call_print
puts "call print me"
print_me
end
protected
def print_me
puts "print me"
end
end
a = Test.new
a.call_print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment