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.
- data/lib/onceler/recorder.rb +5 -3
- metadata +1 -1
data/lib/onceler/recorder.rb
CHANGED
@@ -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
|
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
|