Class: TFA::TotpCommand
- Inherits:
-
Object
- Object
- TFA::TotpCommand
- Defined in:
- lib/tfa/totp_command.rb
Instance Method Summary collapse
-
#initialize(storage) ⇒ TotpCommand
constructor
A new instance of TotpCommand.
- #run(name, secret = secret_for(name)) ⇒ Object
Constructor Details
#initialize(storage) ⇒ TotpCommand
Returns a new instance of TotpCommand.
3 4 5 |
# File 'lib/tfa/totp_command.rb', line 3 def initialize(storage) @storage = storage end |
Instance Method Details
#run(name, secret = secret_for(name)) ⇒ Object
7 8 9 |
# File 'lib/tfa/totp_command.rb', line 7 def run(name, secret = secret_for(name)) secret ? password_for(secret) : all_passwords end |