Class: Zold::WTS::Fake
- Inherits:
-
Object
- Object
- Zold::WTS::Fake
- Defined in:
- lib/zold/wts.rb
Overview
Fake implementation.
Instance Method Summary collapse
- #balance ⇒ Object
- #find(_query) ⇒ Object
- #id ⇒ Object
- #pay(_keygap, _bnf, _amount, _details) ⇒ Object
- #pull ⇒ Object
- #usd_rate ⇒ Object
- #wait(_job, time: 5 * 60) ⇒ Object
Instance Method Details
#balance ⇒ Object
43 44 45 |
# File 'lib/zold/wts.rb', line 43 def balance Zold::Amount.new(zld: 4.0) end |
#find(_query) ⇒ Object
59 60 61 |
# File 'lib/zold/wts.rb', line 59 def find(_query) [] end |
#id ⇒ Object
47 48 49 |
# File 'lib/zold/wts.rb', line 47 def id Zold::Id::ROOT end |
#pay(_keygap, _bnf, _amount, _details) ⇒ Object
51 52 53 |
# File 'lib/zold/wts.rb', line 51 def pay(_keygap, _bnf, _amount, _details) 'job-id' end |
#pull ⇒ Object
39 40 41 |
# File 'lib/zold/wts.rb', line 39 def pull 'job-id' end |
#usd_rate ⇒ Object
55 56 57 |
# File 'lib/zold/wts.rb', line 55 def usd_rate 5_000 end |
#wait(_job, time: 5 * 60) ⇒ Object
63 64 65 66 |
# File 'lib/zold/wts.rb', line 63 def wait(_job, time: 5 * 60) raise 'Time must be positive' if time.negative? 'OK' end |