⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (283 Bytes)
Bug #9542
» the_bug.rb
vrinek (Konstantinos Karachalios)
, 02/20/2014 04:25 PM
require
"delegate"
class
Cow
def
unprotected_moo
"mooooo!"
end
protected
def
protected_moo
"guarded mooooo!"
end
end
my_cow
=
Cow
.
new
puts
SimpleDelegator
.
new
(
my_cow
).
unprotected_moo
# => "mooooo!"
puts
SimpleDelegator
.
new
(
my_cow
).
protected_moo
# => "guarded mooooo!"
« Previous
1
2
Next »
(1-1/2)
Loading...