Class: BitcoinNode::P2p::StoreProbe
- Inherits:
-
Object
- Object
- BitcoinNode::P2p::StoreProbe
- Defined in:
- lib/bitcoin_node/p2p/probe.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #<<(hash) ⇒ Object
-
#initialize ⇒ StoreProbe
constructor
A new instance of StoreProbe.
Constructor Details
#initialize ⇒ StoreProbe
Returns a new instance of StoreProbe.
10 11 12 |
# File 'lib/bitcoin_node/p2p/probe.rb', line 10 def initialize @store = Hash.new { |h, key| h[key] = [] } end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
8 9 10 |
# File 'lib/bitcoin_node/p2p/probe.rb', line 8 def store @store end |
Instance Method Details
#<<(hash) ⇒ Object
14 15 16 17 18 |
# File 'lib/bitcoin_node/p2p/probe.rb', line 14 def <<(hash) hash.each do |key, value| store[key] << value end end |