module Rodish::Plugins::PostCommands::DSLMethods

  1. lib/rodish/plugins/post_commands.rb

Public Instance methods

autoload_post_subcommand_dir(dir)

Similar to autoload_subcommand_dir, but for post subcommands instead of normal subcommands.

[show source]
   # File lib/rodish/plugins/post_commands.rb
40 def autoload_post_subcommand_dir(dir)
41   _autoload_subcommand_dir(@command.post_subcommands, dir)
42 end
post_banner(banner)

Set the banner for post subcommand usage.

[show source]
   # File lib/rodish/plugins/post_commands.rb
25 def post_banner(banner)
26   @command.post_banner = banner
27 end
post_options(banner, key: nil, &block)

Similar to options, but sets the option parser for post subcommands. This option parser is only used when the command is executed and chooses to run a post subcommand.

[show source]
   # File lib/rodish/plugins/post_commands.rb
32 def post_options(banner, key: nil, &block)
33   @command.post_banner = banner
34   @command.post_option_key = key
35   @command.post_option_parser = create_option_parser(&block)
36 end
run_on(command_name, &block)

Same as on, but for post subcommands instead of normal subcommands.

[show source]
   # File lib/rodish/plugins/post_commands.rb
46 def run_on(command_name, &block)
47   _on(@command.post_subcommands, command_name, &block)
48 end