Sha256: f14ea5af48622d2618a584ded91ddfd4330e998ac5fd5d140242a37f0f8d80b2
Contents?: true
Size: 627 Bytes
Versions: 16
Compression:
Stored size: 627 Bytes
Contents
class ZergXcode::Plugins::Ls def help {:short => 'shows the files in a project', :long => <<"END" } Usage: ls [path] Lists all the files in the project at the given path. If no path is given, looks for a project in the current directory. END end def run(args) list = list_for(args.shift || '.') output = "" list.each do |entry| output << "%-20s %s\n" % [entry.last, entry.first] end print output output end def list_for(project_name) ZergXcode.load(project_name).all_files.map do |file| [file[:path], file[:object]['lastKnownFileType']] end end end
Version data entries
16 entries across 16 versions & 2 rubygems