Sha256: 64037dc6b1b30689c3b349f221f75defbbdbf0e50e6de7dd73cf6a9f8d704d08

Contents?: true

Size: 719 Bytes

Versions: 14

Compression:

Stored size: 719 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'bundler/setup'
require 'eac_launcher'

class Runner < ::EacLauncher::Instances::RunnerHelper
  DOC = <<DOCOPT.freeze
Listas os projetos disponíveis.

Usage:
  __PROGRAM__
  __PROGRAM__ -i | --instances
  __PROGRAM__ -h | --help

Options:
  -h --help        Show this screen.
  -i --instances   Show instances.

DOCOPT

  private

  def run
    ::EacLauncher::Context.current.projects.each do |p|
      show_project(p)
    end
  end

  def show_project(p)
    puts project_label(p)
    return unless options['--instances']
    p.instances.each do |i|
      puts "  * #{instance_label(i)}"
    end
  end

  def project_label(p)
    p.to_s.cyan.to_s
  end
end

Runner.new

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
eac_launcher-0.3.2 exe/eac_launcher_projects
eac_launcher-0.3.1 exe/eac_launcher_projects
eac_launcher-0.3.0 exe/eac_launcher_projects
eac_launcher-0.2.2 exe/eac_launcher_projects
eac_launcher-0.2.1 exe/eac_launcher_projects
eac_launcher-0.2.0 exe/eac_launcher_projects
eac_launcher-0.1.7 exe/eac_launcher_projects
eac_launcher-0.1.6 exe/eac_launcher_projects
eac_launcher-0.1.5 exe/eac_launcher_projects
eac_launcher-0.1.3 exe/eac_launcher_projects
eac_launcher-0.1.4 exe/eac_launcher_projects
eac_launcher-0.1.2 exe/eac_launcher_projects
eac_launcher-0.1.1 exe/eac_launcher_projects
eac_launcher-0.1.0 exe/eac_launcher_projects