| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2013-12-18 |
| 在线时间 | 7 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 7 小时
- 注册时间
- 2013-12-9
- 回帖
- 8
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
class People
attr_accessor:name,:age,:motherland
end
class People
def talk
print "my name is#{@name},age is{@age},motherland is{@motherland}"
end
end
p=People.new
p.name="zhangshan"
p.age=17
p.motherland="china"
p.talk
为什么输出总是 my name is zhangshan,age is{@age},motherland is{@motherland}" |
|