peplum 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba9afc619d143df37446d3a6106a81df6fa2e7123faf3266d764b07221526361
4
- data.tar.gz: c1317747cf60bb0ad277afcd18e37a9f75d669a1fffa3152e6d433bc415b1178
3
+ metadata.gz: 3cf68ae5865f247eefd32f97a3171b4306fdf421a8e73df30429d4ee91c32232
4
+ data.tar.gz: d26d484ab649e0258ab2855ac81e14db8dbbb9a06509cf00a5d4b957b188ce6e
5
5
  SHA512:
6
- metadata.gz: 1451674a3ba4585df1efd8acdb2ad2860f83b4b12f446b51de6ecda1caa858ba5c9eaf5c5b4046181eca54cce5690969a5d6072818d13f3dc25c51ab198590c8
7
- data.tar.gz: 9a3c612baae480207d083a3276c9c9aba9aeb6b13781435634b8336fe12ac3c8b21a210044d00dab954099ed7d5c82b023a9d383125594303c487cce37c6ed64
6
+ metadata.gz: 18d05dda4ecd556ba03556dae0754a5c4e085cb90c9f77536abc5156147529b941a9377d3bdf9cfe2b124f0dae4a6cb403d1315190a0a9b0817ab16130c7b383
7
+ data.tar.gz: 58438b5a98f06d5353cbb4ffa5b9f65b15c7d51401a40498af6f82c9c09a4483e04b6bc78ddeda8427bab930c7402e720015c757d490494876877767c019d5a6
@@ -12,39 +12,31 @@ class SharedHash
12
12
  @hash[k]
13
13
  end
14
14
 
15
- def set( k, v, broadcast = true, &block )
16
- if @hash[k] == v
17
- block.call if block_given?
18
- return
19
- end
15
+ def set( k, v, broadcast = true )
16
+ return if @hash[k] == v
20
17
 
21
18
  @hash[k] = v
22
19
 
23
20
  if broadcast
24
21
  each_peer do |peer|
25
- peer.shared_hash.set( k, v, false ) {}
22
+ peer.shared_hash.set( k, v, false )
26
23
  end
27
24
  end
28
25
 
29
- block.call if block_given?
30
26
  nil
31
27
  end
32
28
 
33
29
  def delete( k, broadcast = true )
34
- if !@hash.include? k
35
- block.call if block_given?
36
- return
37
- end
30
+ return if !@hash.include? k
38
31
 
39
32
  @hash.delete( k )
40
33
 
41
34
  if broadcast
42
35
  each_peer do |_, peer|
43
- peer.shared_hash.delete( k, false ) {}
36
+ peer.shared_hash.delete( k, false )
44
37
  end
45
38
  end
46
39
 
47
- block.call if block_given?
48
40
  nil
49
41
  end
50
42
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Peplum
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peplum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tasos Laskos