【文件属性】:
文件名称:方法参数实验室001前工作网
文件大小:7KB
文件格式:ZIP
更新时间:2021-02-23 01:31:16
Ruby
方法参数实验室
目标
定义一个接受参数并在方法主体中使用该参数的方法。
定义一个接受两个参数并在方法主体中使用两个参数的方法。
指示
您将在lib/introduction.rb对方法进行编码。
#introduction方法
运行测试套件以开始使用。 为此,请在终端中运行“ learn或“ learn test 。 让我们看一下第一个错误:
Failures:
1) # introduction takes in an argument of a name and puts out a phrase with that name using string interpolation
Failure/Error: expect{introduction( " Josh " )}.to output( " Hi, my name is Josh.\n " ).to_stdo
【文件预览】:
method-arguments-lab-001-prework-web-master
----CONTRIBUTING.md(2KB)
----.rspec(30B)
----spec()
--------introduction_spec.rb(547B)
--------spec_helper.rb(4KB)
----LICENSE.md(1KB)
----.gitignore(642B)
----.learn(63B)
----lib()
--------introduction.rb(0B)
----README.md(4KB)