Module: CLI::WithOptions
- Defined in:
- lib/cli/modular_options.rb
Instance Method Summary collapse
Instance Method Details
#cli_options(&block) ⇒ Object
6 7 8 9 10 |
# File 'lib/cli/modular_options.rb', line 6 def ( &block ) raise ArgumentError, 'Block required but not given' unless block_given? const_set :CLI_OPTS_HOOKS, Array.new unless const_defined? :CLI_OPTS_HOOKS, false const_get(:CLI_OPTS_HOOKS) << block end |