Class: Plutus::BalanceFinders::BaseBalanceFinder

Inherits:
Object
  • Object
show all
Defined in:
app/models/plutus/balance_finders/base_balance_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ BaseBalanceFinder

Returns a new instance of BaseBalanceFinder.



5
6
7
# File 'app/models/plutus/balance_finders/base_balance_finder.rb', line 5

def initialize(args)
  @amounts = args.fetch(:amounts)
end

Instance Attribute Details

#amountsObject (readonly)

Returns the value of attribute amounts.



4
5
6
# File 'app/models/plutus/balance_finders/base_balance_finder.rb', line 4

def amounts
  @amounts
end

Instance Method Details

#computeObject



8
9
10
# File 'app/models/plutus/balance_finders/base_balance_finder.rb', line 8

def compute
  amounts.total
end