类的继承:
class Male < Person
def moustanche
puts "like boy"
end
Male类,会继承Person的属性
实例:
本文标题:三、类的继承
本文链接:https://www.haomeiwen.com/subject/stesuxtx.html
网友评论