[英]How can I get “thor list” to list methods in ruby class
即使使用最简单的程序,我也无法列出我的任务:
class Mytest < Thor
desc "Hello world", "Puts 'hello world' on the console"
def hello
puts "Hello world"
end
end
这是我运行thor list
时的控制台输出
$ thor list
mytest
------
thor mytest:world # Puts 'hello world' on the console
如您所见,输出中省略了“ hello”方法名称。 你能帮我吗?
谢谢,
保罗
只需将“ desc”行更改为:
desc“ hello”,“在控制台上放置'hello world'
希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.