Similar to the run_on/run_is method additions, add a private method and pass in the hash to modify. When you are autoloading a post subcommand, you cannot use the on/is methods, since those will register a pre subcommand. Allow calling Processor#on without a block to just return the related command, so you can chain a run_on/run_is call on that. Something more advanced would be needed for nested subcommands under a post subcommand, but this should suffice for now.
5 lines
83 B
Ruby
5 lines
83 B
Ruby
# frozen_string_literal: true
|
|
|
|
@ExampleRodish.on("k").run_is("o") do
|
|
push :o
|
|
end
|