#!/usr/bin/env ruby
#
# 文件名: post80g.rb
# 描述:
# 使用Ruby语言实现80后的回忆,谨以此程序献给中国所有的80后朋友!
#
# 生成日期: 2010年4月28日
#
# 作者: 默之
#
# 80后群体
class Post80G
def initialize(name)
@post80_name = name # 80后姓名
end
def set_dream_boat(name)
@dream_boat = name # 恋人
end
# 忆往昔,感慨系之矣。
def remind
puts "#{@post80_name} had beautiful days with #{@dream_boat}."
puts "But they are strangers now ..."
puts "When we were young, we thought it's just an emotional feeling and gave it up. "
puts "We realized that it's our whole life later."
puts "Didn't acquainted with each other at first. Didn't admitted with each other at last."
puts "This program is given to the Chinese Post 80's Generations !"
end
end
p = Post80G.new("GG")
p.set_dream_boat("MM")
p.remind
往事不堪回首:
曾经和你一起度过美好的时光;
然而,如今已成陌生人......
年轻时我们放弃,以为那只是一段感情,后来才知道,那其实是一生。
最初不相识,最终不相认。
谨以此程序献给中国所有的80后们!
ps:上述程序中的GG、MM,读者自己去实例化。运行环境,Ruby 1.8.7 以上版本。