Class: Spoom::Cli::Config
- Inherits:
-
Thor
- Object
- Thor
- Spoom::Cli::Config
- Includes:
- Helper
- Defined in:
- lib/spoom/cli/config.rb
Constant Summary
Constants included from Helper
Instance Method Summary collapse
Methods included from Helper
#blue, #color?, #colorize, #context, #context_requiring_sorbet!, #cyan, #exec_path, #gray, #green, #highlight, #red, #say, #say_error, #say_warning, #yellow
Methods included from Spoom::Colorize
Instance Method Details
#show ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/spoom/cli/config.rb', line 15 def show context = context_requiring_sorbet! config = context.sorbet_config config_path = Pathname.new("#{exec_path}/#{Spoom::Sorbet::CONFIG_PATH}").cleanpath say("Found Sorbet config at `#{config_path}`.") say("\nPaths typechecked:") if config.paths.empty? say(" * (default: .)") else config.paths.each do |path| say(" * #{path}") end end say("\nPaths ignored:") if config.ignore.empty? say(" * (default: none)") else config.ignore.each do |path| say(" * #{path}") end end say("\nAllowed extensions:") if config.allowed_extensions.empty? say(" * .rb (default)") say(" * .rbi (default)") else config.allowed_extensions.each do |ext| say(" * #{ext}") end end end |