Class: FerrisBueller::Mjolnir
- Inherits:
-
Thor
- Object
- Thor
- FerrisBueller::Mjolnir
- Defined in:
- lib/ferris-bueller/mjolnir.rb
Overview
Thor’s hammer! Like Thor with better logging
Direct Known Subclasses
Constant Summary collapse
- COMMON_OPTIONS =
Common options for Thor commands
{ log: { type: :string, aliases: %w[ -l ], desc: 'Log to file instead of STDOUT', default: ENV['FERRIS_BUELLER_LOG'] || nil }, debug: { type: :boolean, aliases: %w[ -v ], desc: 'Enable DEBUG-level logging', default: ENV['FERRIS_BUELLER_DEBUG'] || false }, trace: { type: :boolean, aliases: %w[ -z ], desc: 'Enable TRACE-level logging (overrides DEBUG)', default: ENV['FERRIS_BUELLER_TRACE'] || false } }
Class Method Summary collapse
-
.include_common_options ⇒ Object
Decorate Thor commands with the options above.
Class Method Details
.include_common_options ⇒ Object
Decorate Thor commands with the options above
33 34 35 36 37 |
# File 'lib/ferris-bueller/mjolnir.rb', line 33 def self. COMMON_OPTIONS.each do |name, spec| option name, spec end end |