Sha256: 4054ffcfc112fcb01e6b1d6fa25fde9d344f44fc7101cca1def265d88da40afc

Contents?: true

Size: 860 Bytes

Versions: 7

Compression:

Stored size: 860 Bytes

Contents

module FastlaneCore
  class PrintTable
    class << self
      # This method prints out all the user inputs in a nice table. Useful to summarize the run
      # You can pass an array to `hide_key` if you don't want certain elements to show up (symbols)
      def print_values(config: nil, title: nil, hide_keys: [])
        require 'terminal-table'
        rows = []

        config.available_options.each do |config_item|
          value = config[config_item.key]
          next if value.nil?
          next if value.to_s == ""
          next if hide_keys.include?(config_item.key)

          rows << [config_item.key, value]
        end

        params = {}
        params[:rows] = rows
        params[:title] = title.green if title

        puts ""
        puts Terminal::Table.new(params)
        puts ""

        return params
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fastlane_core-0.28.0 lib/fastlane_core/print_table.rb
fastlane_core-0.27.0 lib/fastlane_core/print_table.rb
fastlane_core-0.26.6 lib/fastlane_core/print_table.rb
fastlane_core-0.26.5 lib/fastlane_core/print_table.rb
fastlane_core-0.26.4 lib/fastlane_core/print_table.rb
fastlane_core-0.26.3 lib/fastlane_core/print_table.rb
fastlane_core-0.26.2 lib/fastlane_core/print_table.rb