10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/messaging/message/follow.rb', line 10
def follow(preceding_message, subsequent_message=nil, copy: nil, include: nil, exclude: nil, strict: nil)
if subsequent_message.nil?
subsequent_message = self
end
if subsequent_message.class == Class
subsequent_message = subsequent_message.build
end
strict = true if strict.nil?
Copy.(preceding_message, subsequent_message, copy: copy, include: include, exclude: exclude, strict: strict, metadata: false)
subsequent_message.metadata.follow(preceding_message.metadata)
subsequent_message
end
|