Module: CreateRubyGem::Options::Catalog
- Defined in:
- lib/create_ruby_gem/options/catalog.rb
Overview
Registry of every bundle gem option create-ruby-gem knows about.
Each entry in DEFINITIONS describes the option’s type and CLI flags. ORDER controls the sequence in which the wizard presents options.
Constant Summary collapse
- DEFINITIONS =
Option definitions keyed by symbolic name.
Each value is a Hash with
:typeand the relevant flag keys (:on/:offfor toggles,:flagfor enums/strings, etc.). { exe: { type: :toggle, on: '--exe', off: '--no-exe' }, coc: { type: :toggle, on: '--coc', off: '--no-coc' }, changelog: { type: :toggle, on: '--changelog', off: '--no-changelog' }, ext: { type: :enum, flag: '--ext', none: '--no-ext', values: %w[c go rust] }, git: { type: :flag, on: '--git' }, github_username: { type: :string, flag: '--github-username' }, mit: { type: :toggle, on: '--mit', off: '--no-mit' }, test: { type: :enum, flag: '--test', none: '--no-test', values: %w[minitest rspec test-unit] }, ci: { type: :enum, flag: '--ci', none: '--no-ci', values: %w[circle github gitlab] }, linter: { type: :enum, flag: '--linter', none: '--no-linter', values: %w[rubocop standard] }, edit: { type: :string, flag: '--edit' }, bundle_install: { type: :toggle, on: '--bundle', off: '--no-bundle' } }.freeze
- ORDER =
Wizard step order — matches the sequence users see.
DEFINITIONS.keys.freeze
Class Method Summary collapse
-
.fetch(key) ⇒ Hash
Fetches the definition for a given option key.
Class Method Details
.fetch(key) ⇒ Hash
Fetches the definition for a given option key.
44 45 46 |
# File 'lib/create_ruby_gem/options/catalog.rb', line 44 def self.fetch(key) DEFINITIONS.fetch(key.to_sym) end |