Class: Decent::ListHodling

Inherits:
Object
  • Object
show all
Defined in:
lib/decent/command/hodling/list_hodling.rb

Class Method Summary collapse

Class Method Details

.execute(args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/decent/command/hodling/list_hodling.rb', line 3

def self.execute(args)
  hodlings = Database[:holdings]
  hodlings.each do |hodling|
    nickname   = hodling[:nickname]
    balance    = hodling[:balance]
    currency   = hodling[:currency]
    updated_at = hodling[:updated_at]

    puts "#{nickname} has a balance of #{balance} #{currency} as of #{updated_at}."
  end
end