The second case expression uses a wildcard for the firstName part of Person but matches against the constant string Neward in the lastName part and wildcards against the age part.
第二个case表达式在Person的firstName部分使用了一个通配符,但在lastName 部分使用常量字符串Neward 来匹配,在age 部分使用通配符来匹配。
In Listing 4, firstname is a string that is specified at runtime.
在清单4中,firstname是一个在运行时指定的字符串。
The HelloMessageApi class defines a hello_message API method that takes two string parameters, firstname and lastname, and returns a string value. The hello_message_api.rb script is shown below.
HelloMessageApi 类将定义 hello_messageAPI方法,该方法将获取两个字符串参数,名字和姓氏,并返回字符串值。
The HelloMessageApi class defines a hello_message API method that takes two string parameters, firstname and lastname, and returns a string value. The hello_message_api.rb script is shown below.
HelloMessageApi 类将定义 hello_messageAPI方法,该方法将获取两个字符串参数,名字和姓氏,并返回字符串值。
应用推荐