Sha256: 6321844871f490912712e6c8b6035ad1efc8b291f82bc0ca226127d32b519c4a

Contents?: true

Size: 508 Bytes

Versions: 67

Compression:

Stored size: 508 Bytes

Contents

class Terraspace::CLI
  class List
    include Concerns::SourceDirs

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

    def run
      source_dirs.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

67 entries across 67 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/cli/list.rb
terraspace-2.2.16 lib/terraspace/cli/list.rb
terraspace-2.2.15 lib/terraspace/cli/list.rb
terraspace-2.2.14 lib/terraspace/cli/list.rb
terraspace-2.2.13 lib/terraspace/cli/list.rb
terraspace-2.2.12 lib/terraspace/cli/list.rb
terraspace-2.2.11 lib/terraspace/cli/list.rb
terraspace-2.2.10 lib/terraspace/cli/list.rb
terraspace-2.2.9 lib/terraspace/cli/list.rb
terraspace-2.2.8 lib/terraspace/cli/list.rb
terraspace-2.2.7 lib/terraspace/cli/list.rb
terraspace-2.2.6 lib/terraspace/cli/list.rb
terraspace-2.2.5 lib/terraspace/cli/list.rb
terraspace-2.2.4 lib/terraspace/cli/list.rb
terraspace-2.2.3 lib/terraspace/cli/list.rb
terraspace-2.2.2 lib/terraspace/cli/list.rb
terraspace-2.2.1 lib/terraspace/cli/list.rb
terraspace-2.2.0 lib/terraspace/cli/list.rb
terraspace-2.1.7 lib/terraspace/cli/list.rb
terraspace-2.1.6 lib/terraspace/cli/list.rb