Module: Canon::Options::CliGenerator

Defined in:
lib/canon/options/cli_generator.rb

Overview

Generates Thor CLI options from the Options Registry This ensures CLI options stay in sync with the centralized registry

Class Method Summary collapse

Class Method Details

.generate_diff_optionsObject

Generate Thor method_option calls for diff command



12
13
14
15
16
17
18
# File 'lib/canon/options/cli_generator.rb', line 12

def generate_diff_options
  lambda do |thor_class|
    Canon::Options::Registry.all_options.each do |opt|
      add_thor_option(thor_class, opt)
    end
  end
end