Exception: Bitcoin::InsufficientFunds

Inherits:
Error
  • Object
show all
Defined in:
lib/bc.rb

Overview

InsufficientFunds is raised when an account (or the bitcoind as a whole) doesn’t have enough Bitcoin to perform an action.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(required, available) ⇒ InsufficientFunds

Returns a new instance of InsufficientFunds.



73
74
75
# File 'lib/bc.rb', line 73

def initialize(required, available)
  super("฿#{required} required, but only #{available} available")
end

Instance Attribute Details

#availableObject (readonly)

This Float is the actual funds we have available to perform the action.



71
72
73
# File 'lib/bc.rb', line 71

def available
  @available
end

#requiredObject (readonly)

This Float is the amount we would need to perform the action.



68
69
70
# File 'lib/bc.rb', line 68

def required
  @required
end