Module: GitHandler::AuthorizedKeys
- Defined in:
- lib/git_handler/authorized_keys.rb
Class Method Summary collapse
-
.write_key(path, key, command) ⇒ Object
Write a single key formatted content to file.
-
.write_keys(path, keys, command) ⇒ Object
Write formatted keys content to file.
Class Method Details
.write_key(path, key, command) ⇒ Object
Write a single key formatted content to file
16 17 18 |
# File 'lib/git_handler/authorized_keys.rb', line 16 def self.write_key(path, key, command) self.write_keys(path, [key], command) end |
.write_keys(path, keys, command) ⇒ Object
Write formatted keys content to file
7 8 9 10 |
# File 'lib/git_handler/authorized_keys.rb', line 7 def self.write_keys(path, keys, command) content = keys.map { |k| k.to_system_key(command) }.join("\n").strip self.write(path, content) end |