Sha256: c302c9b5eaa7add90c30481d2f039ac1b8c77b512316e47e31bbdcb1a4fdec0f

Contents?: true

Size: 525 Bytes

Versions: 17

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true

class ClusterListService
  class << self
    # REFACTOR_ME:
    # Uffizzi.ui.output_format = Uffizzi::UI::Shell::PRETTY_LIST
    # Uffizzi.ui.say(data)
    def render_plain_clusters(clusters)
      clusters.map do |cluster|
        project_name = cluster.dig(:project, :name)

        if project_name.present?
          "- Cluster name: #{cluster[:name].strip} Project name: #{project_name.strip}"
        else
          "- #{cluster[:name]}"
        end
      end.join("\n")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
uffizzi-cli-2.4.11 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.10 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.9 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.8 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.7 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.6 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.5 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.4 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.3 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.2 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.1 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.4.0 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.3.4 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.3.3 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.3.2 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.3.1 lib/uffizzi/services/cluster/list_service.rb
uffizzi-cli-2.3.0 lib/uffizzi/services/cluster/list_service.rb