Sha256: 4621f1262f194806be228ba72bb886517d12327126de17cb6efec268aa80560b

Contents?: true

Size: 878 Bytes

Versions: 42

Compression:

Stored size: 878 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 or true == v or false == v or Symbol === 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

42 entries across 42 versions & 1 rubygems

Version Path
bake-toolkit-2.72.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.71.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.70.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.70.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.69.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.68.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.68.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.67.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.66.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.65.2 lib/bake/options/showToolchains.rb
bake-toolkit-2.65.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.65.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.64.4 lib/bake/options/showToolchains.rb
bake-toolkit-2.64.3 lib/bake/options/showToolchains.rb
bake-toolkit-2.64.2 lib/bake/options/showToolchains.rb
bake-toolkit-2.64.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.64.0 lib/bake/options/showToolchains.rb
bake-toolkit-2.63.2 lib/bake/options/showToolchains.rb
bake-toolkit-2.63.1 lib/bake/options/showToolchains.rb
bake-toolkit-2.63.0 lib/bake/options/showToolchains.rb