?? e6.5-3.rb
字號:
#E6.5-3.rb
class Person
def speak
"protected:speak "
end
def laugh
" private:laugh"
end
protected :speak
private :laugh
def useLaugh(another)
puts another.laugh
end
def useSpeak(another)
puts another.speak
end
end
p1=Person.new
p2=Person.new
p2.useSpeak(p1)
#p2.useLaugh(p1)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -