[英]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.