    # File lib/chef/platform.rb, line 333
          def set(args)
            validate(
              args,
              {
                :platform => {
                  :kind_of => Symbol,
                  :required => false,
                },
                :version => {
                  :kind_of => String,
                  :required => false,
                },
                :resource => {
                  :kind_of => Symbol,
                },
                :provider => {
                  :kind_of => [ String, Symbol, Class ],
                }
              }
            )
            if args.has_key?(:platform)
              if args.has_key?(:version)
                if platforms.has_key?(args[:platform])
                  if platforms[args[:platform]].has_key?(args[:version])
                    platforms[args[:platform]][args[:version]][args[:resource].to_sym] = args[:provider]
                  else
                    platforms[args[:platform]][args[:version]] = {
                      args[:resource].to_sym => args[:provider]
                    }
                  end
                else
                  platforms[args[:platform]] = {
                    args[:version] => {
                      args[:resource].to_sym => args[:provider]
                    }
                  }
                end
              else
                if platforms.has_key?(args[:platform])
                  if platforms[args[:platform]].has_key?(:default)
                    platforms[args[:platform]][:default][args[:resource].to_sym] = args[:provider]
                  else
                    platforms[args[:platform]] = { :default => { args[:resource].to_sym => args[:provider] } }
                  end
                else
                  platforms[args[:platform]] = {
                    :default => {
                      args[:resource].to_sym => args[:provider]
                    }
                  }
                end
              end
            else
              if platforms.has_key?(:default)
                platforms[:default][args[:resource].to_sym] = args[:provider]
              else
                platforms[:default] = {
                  args[:resource].to_sym => args[:provider]
                }
              end
            end
          end