Class: Slugforge::Commands::Config
- Inherits:
-
SubCommand
- Object
- Thor
- Slugforge::Command
- SubCommand
- Slugforge::Commands::Config
- Defined in:
- lib/slugforge/commands/config.rb
Instance Method Summary collapse
Methods inherited from SubCommand
Methods inherited from Slugforge::Command
Methods included from Helper
Constructor Details
This class inherits a constructor from Slugforge::Command
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/slugforge/commands/config.rb', line 5 def show if json? logger.say_json config.values else logger.say "The following configuration options are in use:" rows = config.values.map { |name, value| [name, value] } print_table(rows, :indent => 4) unless config.slugins.empty? logger.say "Slugins detected:" rows = config.slugins.map do |(name, slugin)| [name, slugin.spec.version, slugin.enabled ? 'enabled' : 'disabled'] end print_table(rows, :indent => 4) end end end |