class Terraspace::CLI::List
Public Class Methods
new(options={})
click to toggle source
# File lib/terraspace/cli/list.rb, line 5 def initialize(options={}) @options = options @type_dir = normalized_type end
Public Instance Methods
run()
click to toggle source
# 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
Private Instance Methods
normalized_type()
click to toggle source
# File lib/terraspace/cli/list.rb, line 21 def normalized_type type = @options[:type] if %w[stack module].include?(type) type.pluralize end end