Sha256: 3b9929d287b27a32b1c4bbff036357a3c7676695f561bb10d2d5c2739b14493c

Contents?: true

Size: 932 Bytes

Versions: 17

Compression:

Stored size: 932 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.fetch(config_item.key, ask: false) # Don't ask the user for missing values at this point
          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

17 entries across 17 versions & 1 rubygems

Version Path
fastlane_core-0.36.8 lib/fastlane_core/print_table.rb
fastlane_core-0.36.7 lib/fastlane_core/print_table.rb
fastlane_core-0.36.6 lib/fastlane_core/print_table.rb
fastlane_core-0.36.5 lib/fastlane_core/print_table.rb
fastlane_core-0.36.4 lib/fastlane_core/print_table.rb
fastlane_core-0.36.3 lib/fastlane_core/print_table.rb
fastlane_core-0.36.2 lib/fastlane_core/print_table.rb
fastlane_core-0.36.1 lib/fastlane_core/print_table.rb
fastlane_core-0.36.0 lib/fastlane_core/print_table.rb
fastlane_core-0.35.1 lib/fastlane_core/print_table.rb
fastlane_core-0.35.0 lib/fastlane_core/print_table.rb
fastlane_core-0.34.0 lib/fastlane_core/print_table.rb
fastlane_core-0.33.0 lib/fastlane_core/print_table.rb
fastlane_core-0.32.1 lib/fastlane_core/print_table.rb
fastlane_core-0.32.0 lib/fastlane_core/print_table.rb
fastlane_core-0.31.0 lib/fastlane_core/print_table.rb
fastlane_core-0.30.0 lib/fastlane_core/print_table.rb