Class: Ace::Support::Nav::CLI::Commands::Sources
- Inherits:
-
Cli::Command
- Object
- Cli::Command
- Ace::Support::Nav::CLI::Commands::Sources
- Includes:
- Cli::Base
- Defined in:
- lib/ace/support/nav/cli/commands/sources.rb
Overview
ace-support-cli Command class for the sources command
Instance Method Summary collapse
Instance Method Details
#call(**options) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/ace/support/nav/cli/commands/sources.rb', line 51 def call(**) # Initialize instance variables for use in private methods @options = @engine = Organisms::NavigationEngine.new execute end |
#execute ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/ace/support/nav/cli/commands/sources.rb', line 59 def execute display_config_summary sources = @engine.sources(verbose: @options[:verbose]) if @options[:verbose] require "json" puts JSON.pretty_generate(sources) else puts "Available sources:" sources.each { |source| puts " #{source}" } end 0 end |