Class: Sibit::Dry
- Inherits:
-
Object
- Object
- Sibit::Dry
- Defined in:
- lib/sibit/dry.rb
Overview
Dry mode decorator for API classes.
Wraps any API object and prevents push() from sending transactions. All other methods are delegated to the wrapped API unchanged.
- Author
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
Copyright (c) 2019-2026 Yegor Bugayenko
- License
MIT
Instance Method Summary collapse
-
#initialize(api, log: Loog::NULL) ⇒ Dry
constructor
A new instance of Dry.
- #push(_hex) ⇒ Object
Constructor Details
#initialize(api, log: Loog::NULL) ⇒ Dry
Returns a new instance of Dry.
18 19 20 21 |
# File 'lib/sibit/dry.rb', line 18 def initialize(api, log: Loog::NULL) @api = api @log = log end |
Instance Method Details
#push(_hex) ⇒ Object
25 26 27 28 |
# File 'lib/sibit/dry.rb', line 25 def push(_hex) @log.debug('Transaction not pushed, dry mode is ON') nil end |