Sha256: 388d8d3f8a2a9748ce5bd2bda5ea5967158aaef9d9d456f031ce74ed9dfd798a
Contents?: true
Size: 563 Bytes
Versions: 21
Compression:
Stored size: 563 Bytes
Contents
class Terraspace::CLI class List def initialize(options={}) @options = options @type_dir = normalized_type end def run dirs = Dir.glob("{app,vendor}/{modules,stacks}/*").select { |p| File.directory?(p) } dirs.sort.each do |path| if @type_dir puts path if path.include?("/#{@type_dir}/") else puts path end end end private def normalized_type type = @options[:type] if %w[stack module].include?(type) type.pluralize end end end end
Version data entries
21 entries across 21 versions & 1 rubygems