diff --git a/README.md b/README.md index d1fcc5ce097d03e3b6ef72765b53ebcc0fef5c6c..793dd2afaa5420e53a9545278eed857c6e5b6d30 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,10 @@ class App extends AssmusMenu { } @MenuOption(name = "Quit", pattern = "q") - public void help(Object[] args) { - // Sets the run variable of the main loop to false. - args[0] = false; + public boolean quit() { + // If a boolean is returned, the run variable + // of the main loop will be set to its value. + return false; } } ``` @@ -49,6 +50,20 @@ class Main { > ``` +## Method parameters +Following parameter will be passed to the called method if +it declares a parameter of the particular type. + +| Type | Passed Object | +|----------------|---------------------------------| +| boolean | run variable of main loop | +| BufferedReader | An instance of a BufferedReader | + +## Return types +The annotated method must have a return type of `void` or `boolean`. +If the type is `boolean`, the run variable of the main loop will be +set to the return value of the method. + --- ## `( •_•)>âŒâ– -â– ` \ No newline at end of file