Class: Zold::List
- Inherits:
-
Object
- Object
- Zold::List
- Defined in:
- lib/zold/commands/list.rb
Overview
LIST command
Instance Method Summary collapse
-
#initialize(wallets:, log: Log::Quiet.new) ⇒ List
constructor
A new instance of List.
- #run(_ = []) ⇒ Object
Constructor Details
Instance Method Details
#run(_ = []) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/zold/commands/list.rb', line 36 def run(_ = []) @wallets.all.each do |id| wallet = Wallet.new(File.join(@wallets.path, id)) msg = "#{id}: #{wallet.balance}" msg += " (net:#{wallet.network})" if wallet.network != Wallet::MAIN_NETWORK @log.info(msg) end end |