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.



80
81
82
# File 'lib/bc.rb', line 80

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.



78
79
80
# File 'lib/bc.rb', line 78

def available
  @available
end

#requiredObject (readonly)

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



75
76
77
# File 'lib/bc.rb', line 75

def required
  @required
end