Exception: BSV::Wallet::InsufficientFundsError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bsv/wallet/insufficient_funds_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, required: nil, available: nil) ⇒ InsufficientFundsError

Returns a new instance of InsufficientFundsError.



8
9
10
11
12
# File 'lib/bsv/wallet/insufficient_funds_error.rb', line 8

def initialize(message = nil, required: nil, available: nil)
  @required = required
  @available = available
  super(message || "insufficient funds: need #{required}, have #{available}")
end

Instance Attribute Details

#availableObject (readonly)

Returns the value of attribute available.



6
7
8
# File 'lib/bsv/wallet/insufficient_funds_error.rb', line 6

def available
  @available
end

#requiredObject (readonly)

Returns the value of attribute required.



6
7
8
# File 'lib/bsv/wallet/insufficient_funds_error.rb', line 6

def required
  @required
end