Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve docs on invoke.

  • Loading branch information...
commit 60fb50f45bab346dda618fe623cfad5bf86c1e1f 1 parent 4647c98
@josevalim josevalim authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  README.md
View
2  README.md
@@ -160,6 +160,8 @@ The output is "1 2 3", which means that the three task was invoked only once.
You can even invoke tasks from another class, so be sure to check the
[documentation](http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor.html).
+Notice invocations do not share the same object. I.e, Thor will instantiate Counter once to invoke the task one, then, it instantiates another to invoke the task two and another for task three. This happens to allow options and arguments to parsed again. For example, if two and three have different options and both of them were given to the command line, calling invoke makes them be parsed each time and used accordingly by each task.
+
## Thor::Group
Thor has a special class called Thor::Group. The main difference to Thor class
Please sign in to comment.
Something went wrong with that request. Please try again.