Sha256: 414d8d02b97ea4f309267fbd647c5989bc7f89ab39b56b6257aa4aa50385d201
Contents?: true
Size: 1.05 KB
Versions: 16
Compression:
Stored size: 1.05 KB
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
16 entries across 16 versions & 1 rubygems