Class: MRM::ConfigStorage
- Inherits:
-
Object
- Object
- MRM::ConfigStorage
- Defined in:
- lib/mrm/config_storage.rb
Instance Method Summary collapse
-
#initialize(url, login, password) ⇒ ConfigStorage
constructor
A new instance of ConfigStorage.
- #store! ⇒ Object
Constructor Details
#initialize(url, login, password) ⇒ ConfigStorage
Returns a new instance of ConfigStorage.
3 4 5 |
# File 'lib/mrm/config_storage.rb', line 3 def initialize(url, login, password) @url, @login, @password = url, login, password end |
Instance Method Details
#store! ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/mrm/config_storage.rb', line 7 def store! f = File.new("#{Dir.home}/.mrmconfig", 'w') f.puts("REGISTRY_URL: #{url}") f.puts("REGISTRY_LOGIN: #{login}") f.puts("REGISTRY_PASS: #{password}") f.close end |