Sha256: ab8b16ed3a464e41355556a9636b3d38655f7f3bb2c16ea2c15ca30daaf24a12

Contents?: true

Size: 970 Bytes

Versions: 65

Compression:

Stored size: 970 Bytes

Contents

# frozen_string_literal: true

require 'avm/launcher/stereotype'
require 'avm/projects/stereotypes'
require 'avm/tools/core_ext'

module Avm
  module Tools
    class Runner
      class LauncherStereotypes
        class List
          runner_with :help, :output do
            bool_opt '-d', '--deprecated'
          end

          def run
            infov 'Found', stereotypes.count
            run_output
          end

          def output_content
            stereotypes.map { |s| "#{s}\n" }.join
          end

          private

          def stereotypes
            (parsed.deprecated? ? deprecated_stereotypes : registry_stereotypes)
          end

          def registry_stereotypes
            ::Avm::Registry.launcher_stereotypes.available.sort_by { |s| [s.name] }
          end

          def deprecated_stereotypes
            ::Avm::Launcher::Stereotype.stereotypes.sort_by { |s| [s.stereotype_name] }
          end
        end
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
eac_tools-0.65.1 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
avm-tools-0.147.0 lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.65.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
avm-tools-0.146.0 lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.64.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.63.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.62.1 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.62.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.61.1 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.61.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.60.3 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.60.2 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.60.1 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.60.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.59.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.58.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.57.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.56.1 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.56.0 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb
eac_tools-0.55.7 sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb