set_sync 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/set_sync.rb +7 -0
  2. metadata +2 -2
data/lib/set_sync.rb CHANGED
@@ -75,6 +75,13 @@ class SetSync
75
75
  do_sync
76
76
  end
77
77
 
78
+ def sync_with_delegate(delegate)
79
+ on_enter { |remote| delegate.on_enter(remote) }
80
+ on_update { |local, remote| delegate.on_update(local, remote) }
81
+ on_exit { |local| delegate.on_exit(local) }
82
+ do_sync
83
+ end
84
+
78
85
  def do_sync
79
86
  do_entering
80
87
  do_exiting
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: set_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-09 00:00:00.000000000 Z
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Syncs sets
15
15
  email: phil@latentflip.com