Class: Gratan::Identifier::Auto
- Inherits:
-
Object
- Object
- Gratan::Identifier::Auto
- Defined in:
- lib/gratan/identifier/auto.rb
Instance Method Summary collapse
- #identify(user, host) ⇒ Object
-
#initialize(output, options = {}) ⇒ Auto
constructor
A new instance of Auto.
Constructor Details
#initialize(output, options = {}) ⇒ Auto
Returns a new instance of Auto.
2 3 4 5 6 7 8 9 10 |
# File 'lib/gratan/identifier/auto.rb', line 2 def initialize(output, = {}) @options = if output == '-' @output = $stdout else @output = open(output, 'w') end end |
Instance Method Details
#identify(user, host) ⇒ Object
12 13 14 15 16 |
# File 'lib/gratan/identifier/auto.rb', line 12 def identify(user, host) password = mkpasswd puts_password(user, host, password) password end |