ruby语句中的组成部分是什么
What are the components in the ruby statement
我是 Ruby 的新手。在为 iOS 使用 fastlane 时,在 fastfile 中我看到以下语句
lane :mybuildlane do
结束
泳道是一种类型吗?
mybuildlane 之前的冒号表示什么?
mybuildlane 是闭包名称吗?
对于那些反对投票的人,请评论你为什么这样做。
在问这个问题之前我做了我的研究?
lane
是您正在调用的 method 的名称。
:mybuildlane
是一个Symbol
; ruby.
中的基本数据类型之一
do ... end
,或{
... }
表示一个块(一种闭包)。
代码实际上在做什么?我需要查看整个上下文并阅读 gem 的文档,才能告诉您!
这是对带有代码块的 ruby 方法的调用。
lane
是调用的方法
:mybuildlane
是某个进程进入方法的符号
do
表示 do ... end
,与 ruby 中的 { ... }
相同,它是对代码块的引用。 See this link and you can lern more about this type of method calls
我是 Ruby 的新手。在为 iOS 使用 fastlane 时,在 fastfile 中我看到以下语句
lane :mybuildlane do
结束
泳道是一种类型吗? mybuildlane 之前的冒号表示什么? mybuildlane 是闭包名称吗?
对于那些反对投票的人,请评论你为什么这样做。 在问这个问题之前我做了我的研究?
lane
是您正在调用的 method 的名称。
:mybuildlane
是一个Symbol
; ruby.
do ... end
,或{
... }
表示一个块(一种闭包)。
代码实际上在做什么?我需要查看整个上下文并阅读 gem 的文档,才能告诉您!
这是对带有代码块的 ruby 方法的调用。
lane
是调用的方法
:mybuildlane
是某个进程进入方法的符号
do
表示 do ... end
,与 ruby 中的 { ... }
相同,它是对代码块的引用。 See this link and you can lern more about this type of method calls