Thor Executable - Ignore Task Name

后端 未结 3 1545
我在风中等你
我在风中等你 2021-02-13 19:42

The thor wiki page, Making an Exectable, shows you how to create a thor powered CLI command that looks something like this:

bash ./mythorcommand foo

<
3条回答
  •  一生所求
    2021-02-13 20:30

    You should extend from Thor::Group and that call start method

    class Test < Thor::Group
      desc "Act description"
      def act
        puts "do smth"
      end
    end
    
    Test.start
    

提交回复
热议问题