Class | Thor::Shell::Basic |
In: |
lib/thor/shell/basic.rb
|
Parent: | Object |
base | [RW] | |
padding | [RW] |
Called if something goes wrong during the execution. This is used by Thor internally and should not be used inside your scripts. If someone went wrong, you can always raise an exception. If you raise a Thor::Error, it will be rescued and wrapped in the method below.
Deals with file collision and returns true if the file should be overwriten and false otherwise. If a block is given, it uses the block response as the content for the diff.
destination<String>: | the destination file to solve conflicts |
block<Proc>: | an optional block that returns the value to be used in diff |
Prints a table.
Array[Array[String, String, …]]
ident<Integer>: | Ident the first column by ident value. |
Say (print) something to the user. If the sentence ends with a whitespace or tab character, a new line is not appended (print + flush). Otherwise are passed straight to puts (behavior got from Highline).
say("I know you knew that.")
Say a status with the given color and appends the message. Since this method is used frequently by actions, it allows nil or false to be given in log_status, avoiding the message from being shown. If a Symbol is given in log_status, it‘s used as the color.