Class: Message::Recorder::Chain
- Defined in:
- lib/message-recorder/chain.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(array = []) ⇒ Chain
constructor
A new instance of Chain.
- #record(message) ⇒ Object
- #record_message(m, *args, &block) ⇒ Object
- #send_to(chain_subject, recorder) ⇒ Object
Methods inherited from Array
Constructor Details
#initialize(array = []) ⇒ Chain
Returns a new instance of Chain.
25 26 27 |
# File 'lib/message-recorder/chain.rb', line 25 def initialize(array=[]) super(array) end |
Instance Method Details
#record(message) ⇒ Object
33 34 35 |
# File 'lib/message-recorder/chain.rb', line 33 def record() push end |
#record_message(m, *args, &block) ⇒ Object
29 30 31 |
# File 'lib/message-recorder/chain.rb', line 29 def (m, *args, &block) record ::Message::Recorder::Message.new(m, args, block) end |
#send_to(chain_subject, recorder) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/message-recorder/chain.rb', line 37 def send_to(chain_subject, recorder) inject(chain_subject) do |call_subject,| = .(call_subject) return nil unless recorder.filter_before_call() .execute return nil unless recorder.filter_after_call() .return_value end end |