标签:style blog http color 2014 div
def say_goodnight(name) result ="Good night ." +name return result end def say_goodmorning(name) result ="Good morning .#{name}" return result end def say_goodafternoon(name) result ="Good afternoon .#{name}" end puts say_goodnight("jake") puts say_goodmorning("heidsoft") puts say_goodafternoon("heidcloud")
局部变量、方法参数和方法名称都必须以小写字母和下划线开始
全局变量,以($)为前缀
实例变量,以(@)符号开始
类变量,以(@@)两个@符号开始
类名称、模块名称和常量都必须以一个大写字母开始
标签:style blog http color 2014 div
原文地址:http://www.cnblogs.com/heidsoft/p/3841883.html