Sha256: 73dacc1ebc315635d9e395adfb59db616bd913c5a2f5a1b37dc38deb386b8b43

Contents?: true

Size: 308 Bytes

Versions: 12

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module CobraCommander
  module Output
    # Prints a list of components' names sorted alphabetically
    class FlatList
      def initialize(components)
        @components = components
      end

      def to_s
        @components.map(&:name).sort
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cobra_commander-0.15.1 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.15.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.14.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.13.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.12.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.11.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.10.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.9.2 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.9.1 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.9.0 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.8.1 lib/cobra_commander/output/flat_list.rb
cobra_commander-0.8.0 lib/cobra_commander/output/flat_list.rb