Sha256: af31fde6d1065e1d8ce49b213109e4fab2183662cbfb6e67efb6103c52618f1d

Contents?: true

Size: 854 Bytes

Versions: 16

Compression:

Stored size: 854 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 if title

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

        return params
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fastlane_core-0.26.1 lib/fastlane_core/print_table.rb
fastlane_core-0.26.0 lib/fastlane_core/print_table.rb
fastlane_core-0.25.4 lib/fastlane_core/print_table.rb
fastlane_core-0.25.3 lib/fastlane_core/print_table.rb
fastlane_core-0.25.2 lib/fastlane_core/print_table.rb
fastlane_core-0.25.1 lib/fastlane_core/print_table.rb
fastlane_core-0.25.0 lib/fastlane_core/print_table.rb
fastlane_core-0.24.0 lib/fastlane_core/print_table.rb
fastlane_core-0.23.0 lib/fastlane_core/print_table.rb
fastlane_core-0.22.3 lib/fastlane_core/print_table.rb
fastlane_core-0.22.2 lib/fastlane_core/print_table.rb
fastlane_core-0.22.1 lib/fastlane_core/print_table.rb
fastlane_core-0.21.1 lib/fastlane_core/print_table.rb
fastlane_core-0.21.0 lib/fastlane_core/print_table.rb
fastlane_core-0.20.0 lib/fastlane_core/print_table.rb
fastlane_core-0.19.0 lib/fastlane_core/print_table.rb