Class: Terraspace::CLI::List

Inherits:
Object
  • Object
show all
Includes:
Concerns::SourceDirs
Defined in:
lib/terraspace/cli/list.rb

Instance Method Summary collapse

Methods included from Concerns::SourceDirs

#app_source_dirs, #source_dirs

Constructor Details

#initialize(options = {}) ⇒ List

Returns a new instance of List.



5
6
7
8
# File 'lib/terraspace/cli/list.rb', line 5

def initialize(options={})
  @options = options
  @type_dir = normalized_type
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
# File 'lib/terraspace/cli/list.rb', line 10

def run
  source_dirs.each do |path|
    if @type_dir
      puts path if path.include?("/#{@type_dir}/")
    else
      puts path
    end
  end
end