Class: ItsyBtc::Commands::ListCommand
- Defined in:
- lib/itsy-btc/commands/list_command.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/itsy-btc/commands/list_command.rb', line 7 def run if @wallet.nil? puts "No wallet found! Use `itsy init` to create one." exit end entries = @wallet.entries if entries.empty? puts "This wallet is empty." else puts "Address Comment" entries.each do |entry| puts "#{entry.address} #{entry.comment}" end end end |