Class: Vinz::Clortho::GitHubKeyUploader
- Inherits:
-
Object
- Object
- Vinz::Clortho::GitHubKeyUploader
- Defined in:
- lib/vinz/clortho/github_key_uploader.rb
Instance Method Summary collapse
-
#initialize(initials, username, password) ⇒ GitHubKeyUploader
constructor
A new instance of GitHubKeyUploader.
- #upload(title) ⇒ Object
Constructor Details
#initialize(initials, username, password) ⇒ GitHubKeyUploader
Returns a new instance of GitHubKeyUploader.
6 7 8 9 10 |
# File 'lib/vinz/clortho/github_key_uploader.rb', line 6 def initialize(initials, username, password) @manager = GitAuthorsManager.new @initials = initials @username, @password = username, password end |
Instance Method Details
#upload(title) ⇒ Object
12 13 14 15 |
# File 'lib/vinz/clortho/github_key_uploader.rb', line 12 def upload(title) key = File.open("#{@manager.key_path_for(@initials)}.pub", "r").read client.add_key(title, key) end |