相关疑难解决方法(0)

Ruby中方法名称的限制是什么?

例如,我bundler?在以下代码段中找到了方法名称,并且不知道该?字符是专用关键字还是仅仅是方法名称的一部分.

# This is a predicate useful for the doc:guides task of applications.
def bundler?
  # Note that rake sets the cwd to the one that contains the Rakefile
  # being executed.
  File.exists?('Gemfile')
end
Run Code Online (Sandbox Code Playgroud)

ruby

44
推荐指数
2
解决办法
2万
查看次数

标签 统计

ruby ×1