Class: TFA::ShowCommand
- Inherits:
-
Object
- Object
- TFA::ShowCommand
- Defined in:
- lib/tfa/show_command.rb
Instance Method Summary collapse
-
#initialize(storage) ⇒ ShowCommand
constructor
A new instance of ShowCommand.
- #run(arguments) ⇒ Object
Constructor Details
#initialize(storage) ⇒ ShowCommand
Returns a new instance of ShowCommand.
3 4 5 |
# File 'lib/tfa/show_command.rb', line 3 def initialize(storage) @storage = storage end |
Instance Method Details
#run(arguments) ⇒ Object
7 8 9 10 |
# File 'lib/tfa/show_command.rb', line 7 def run(arguments) return @storage.secret_for(arguments.last) if arguments.any? @storage.all_secrets end |