Assign hash key value pairs as arguments for a method

前端 未结 0 1991
余生分开走
余生分开走 2021-01-21 07:06

Here is my code:

class X
    def test(name = "Barney", age = 10, gender = "male")
        @name = name
        @age = age
        @gender = ge         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题