Flowdock
method

rubygems_api_key=

Importance_0
v1_9_3_125 - Show latest stable - 0 notes - Class: ConfigFile
rubygems_api_key=(api_key) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/config_file.rb, line 219
  def rubygems_api_key=(api_key)
    config = load_file(credentials_path).merge(:rubygems_api_key => api_key)

    dirname = File.dirname credentials_path
    Dir.mkdir(dirname) unless File.exist? dirname

    Gem.load_yaml

    File.open(credentials_path, 'w') do |f|
      f.write config.to_yaml
    end

    @rubygems_api_key = api_key
  end
Register or log in to add new notes.