Sha256: 653febab5e5c9965477ece9ee9eae1ba7631e989607b17ccd8f214cf60f79213

Contents?: true

Size: 838 Bytes

Versions: 1

Compression:

Stored size: 838 Bytes

Contents

# encoding: UTF-8

class Ide < Thor

  desc "list", "show instaled IDE versions"
  def list
    report_ides IDEServices.idelist
  end

  desc "use IDE-TAG", "use IDE with IDE-TAG"
  def use(ide_tag)
    puts "Active path: " + IDEServices.use(ide_tag)
  end
  
  desc "used", "list used IDEs in project"
  def used
    report_ides IDEServices.ideused
  end

  desc "start IDE-TAG  ", "start IDE with IDE-TAG"
  def start(idever=nil)
    idever ||= IDEServices.default_ide
    ide = IDEServices.new(idever, ROOT)
    ide.start 
  end

private

  def report_ides(ides)
    if ides.empty?
      say "NO IDE(s) found\n"
    else
      say "found IDEs:\n"
      infos = IDEServices::IDEInfos
      say ides.map{|ide| ide  + ": #{infos[ide][:name]}, #{infos[ide][:desc]}"}.join("\n")
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
delphivm-0.9.0 lib/dvm/ide.thor