Sha256: 975e5fd03dd96a68b7c3a2c2fc9bf8d8f33cff22665e92eb1155c5d987457059
Contents?: true
Size: 440 Bytes
Versions: 2
Compression:
Stored size: 440 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
anvil-core-0.6.0 | lib/tasks/projects/list_task.rb |
anvil-core-0.5.0 | lib/tasks/projects/list_task.rb |