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.1.5 lib/terraspace/cli/list.rb
terraspace-2.1.4 lib/terraspace/cli/list.rb
terraspace-2.1.3 lib/terraspace/cli/list.rb
terraspace-2.1.2 lib/terraspace/cli/list.rb
terraspace-2.1.1 lib/terraspace/cli/list.rb
terraspace-2.1.0 lib/terraspace/cli/list.rb
terraspace-2.0.3 lib/terraspace/cli/list.rb
terraspace-2.0.2 lib/terraspace/cli/list.rb
terraspace-2.0.1 lib/terraspace/cli/list.rb
terraspace-2.0.0 lib/terraspace/cli/list.rb
terraspace-1.1.7 lib/terraspace/cli/list.rb
terraspace-1.1.6 lib/terraspace/cli/list.rb
terraspace-1.1.5 lib/terraspace/cli/list.rb
terraspace-1.1.4 lib/terraspace/cli/list.rb
terraspace-1.1.3 lib/terraspace/cli/list.rb
terraspace-1.1.2 lib/terraspace/cli/list.rb
terraspace-1.1.1 lib/terraspace/cli/list.rb
terraspace-1.1.0 lib/terraspace/cli/list.rb
terraspace-1.0.6 lib/terraspace/cli/list.rb
terraspace-1.0.5 lib/terraspace/cli/list.rb