Class: BitcoinNode::P2p::StoreProbe

Inherits:
Object
  • Object
show all
Defined in:
lib/bitcoin_node/p2p/probe.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStoreProbe

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

#storeObject (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