Class: Terraspace::CLI::List
- Inherits:
-
Object
- Object
- Terraspace::CLI::List
- Includes:
- Concerns::SourceDirs
- Defined in:
- lib/terraspace/cli/list.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
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 = @type_dir = normalized_type end |
Instance Method Details
#run ⇒ Object
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 |