Class: TxCatcher::Catcher
- Inherits:
-
Object
- Object
- TxCatcher::Catcher
- Defined in:
- lib/txcatcher/catcher.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#sockets ⇒ Object
Returns the value of attribute sockets.
Instance Method Summary collapse
-
#initialize(name:, socket: "ipc:///tmp/") ⇒ Catcher
constructor
A new instance of Catcher.
Constructor Details
#initialize(name:, socket: "ipc:///tmp/") ⇒ Catcher
Returns a new instance of Catcher.
7 8 9 10 11 12 13 14 15 |
# File 'lib/txcatcher/catcher.rb', line 7 def initialize(name:, socket: "ipc:///tmp/") @queue = {} @sockets = {} {'rawtx' => "#{socket}#{name}.rawtx", 'hashblock' => "#{socket}#{name}.hashblock"}.each do |channel, address| LOGGER.report "Start listening on #{name} #{channel}... (#{address})" (channel: channel, address: address) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/txcatcher/catcher.rb', line 5 def name @name end |
#sockets ⇒ Object
Returns the value of attribute sockets.
5 6 7 |
# File 'lib/txcatcher/catcher.rb', line 5 def sockets @sockets end |