Sha256: 3d3e6b93636a3e2ba0390726e11b68882ced6cc4daa672d71743705b580458f8
Contents?: true
Size: 1001 Bytes
Versions: 10
Compression:
Stored size: 1001 Bytes
Contents
# frozen_string_literal: true require 'eac_launcher/context' require 'eac_launcher/instances/runner_helper' module EacLauncher class Runner < ::EacRubyUtils::Console::DocoptRunner class Projects < ::EacLauncher::Instances::RunnerHelper DOC = <<DOCOPT Shows available projects. Usage: __PROGRAM__ [options] __PROGRAM__ -h | --help Options: -h --help Show this screen. -i --instances Show instances. --recache Rewrite instances cache. DOCOPT def run ::EacLauncher::Context.current.recache = options['--recache'] ::EacLauncher::Context.current.projects.each do |p| show_project(p) end end private def show_project(project) puts project_label(project) return unless options['--instances'] project.instances.each do |i| puts " * #{instance_label(i)}" end end def project_label(project) project.to_s.cyan.to_s end end end end
Version data entries
10 entries across 10 versions & 1 rubygems