Class: Sibit::Dry

Inherits:
Object
  • Object
show all
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

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