Sha256: 2096d06558b63f149f33959dedceabd4be49d15a502e12f14ff9613433af5d9a

Contents?: true

Size: 835 Bytes

Versions: 92

Compression:

Stored size: 835 Bytes

Contents

module Bake
  class ToolchainInfo

    def self.printHash(x, level)
      x.each do |k,v|
        if Hash === v
          if level > 0
            level.times {print "  "}
          else
            print "\n"
          end
          puts k
          printHash(v,level+1)
        elsif Array === v or String === v
          level.times {print "  "}
          print "\n" if (level == 0)
          puts "#{k} = #{v}"
        end
      end
    end

    def self.showToolchain(x)
      tcs = Bake::Toolchain::Provider[x]
      if tcs.nil?
        puts "Toolchain not available"
      else
        printHash(tcs, 0)
      end
      ExitHelper.exit(0)
    end

    def self.showToolchainList()
      puts "Available toolchains:"
      Bake::Toolchain::Provider.list.keys.each { |c| puts "* #{c}" }
      ExitHelper.exit(0)
    end

  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
bake-toolkit-2.48.3 lib/bake/options/showToolchains.rb
bake-toolkit-2.48.2 lib/bake/options/showToolchains.rb
bake-toolkit-2.48.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.48.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.47.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.47.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.46.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.45.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.44.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.44.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.43.2 lib/bake/options/showToolchains.rb
bake-toolkit-2.43.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.43.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.42.3 lib/bake/options/showToolchains.rb
bake-toolkit-2.42.2 lib/bake/options/showToolchains.rb
bake-toolkit-2.42.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.42.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.41.4 lib/bake/options/showToolchains.rb
bake-toolkit-2.41.3 lib/bake/options/showToolchains.rb
bake-toolkit-2.41.2 lib/bake/options/showToolchains.rb