once-ler 0.0.14 → 0.0.15

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/onceler/recorder.rb +5 -3
  2. metadata +1 -1
@@ -29,6 +29,10 @@ module Onceler
29
29
  @named_recordings = []
30
30
  end
31
31
 
32
+ def parent_tape
33
+ parent.tape || parent.parent_tape if parent
34
+ end
35
+
32
36
  def <<(block)
33
37
  @recordings << Recording.new(block)
34
38
  end
@@ -51,9 +55,7 @@ module Onceler
51
55
  begin_transactions!
52
56
  @tape = @group_class.new
53
57
  @tape.send :extend, Recordable
54
- if parent = @group_class.parent_onceler
55
- @tape.copy_from(parent.tape)
56
- end
58
+ @tape.copy_from(parent_tape) if parent_tape
57
59
 
58
60
  run_before_hooks(:record, @tape)
59
61
  # we don't know the order named recordings will be called (or if
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: once-ler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: