Sha256: 0ce53d871cad731066fcb6cfc529ce7838f2bfebff9c2e728c1827de3ecf0dc4
Contents?: true
Size: 439 Bytes
Versions: 11
Compression:
Stored size: 439 Bytes
Contents
require 'anvil/task' module Projects class ListTask < Anvil::Task description 'List the projects that anvil can manage.' def initialize(options = {}); end def task Dir.chdir(Anvil::Config.base_projects_path) { list_projects(projects) } end def projects Dir.glob('*').select { |f| File.directory?(f) }.sort end def list_projects(names) printf("%s\n", names.join("\n")) end end end
Version data entries
11 entries across 11 versions & 1 rubygems