You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey @gtjgtjgtj - just in case remember to write @codereading/readers so everyone is notified of your issue. Should only need to do it once when you create one.
Hi, all, @codereading/readers.
I'm reading thor, and here's my report and questions.
Given a task like this.
Here's how thor works.
when *class Example < Thor *, thor will register Example into namespaces.
using:
this method will be called, every time a subclass is inheriting Thor.
when * desc "", "", method_options*, thor will call class methods desc, method_options.
using:
it will save desc, and options to instance variables, @desc, @method_options.
when ** def show **. thor will save show into array tasks[].
using:
it creates a task, and save current @desc, @method_options to the task,
then add this new task into array tasks[]
when you call "thor example:show", thor will look for namespaces and task names.
once it find 1 namespace aka class, and 1 match task name inside that namespace.
it create a instance, and instance.send(task_name, *args).
thanks
Jarodzzzzz
hope it helps some one who just started reading.
The text was updated successfully, but these errors were encountered: