Class: Footnotes::Notes::RsolrSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- Footnotes::Notes::RsolrSubscriber
- Defined in:
- lib/notes/rsolr_requests_note.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize ⇒ RsolrSubscriber
constructor
A new instance of RsolrSubscriber.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ RsolrSubscriber
Returns a new instance of RsolrSubscriber.
80 81 82 83 84 85 86 87 |
# File 'lib/notes/rsolr_requests_note.rb', line 80 def initialize self.events = [] ActiveSupport::Notifications.subscribe("execute.rsolr_client") do |*args| # args.last[:caller] = caller @events << RsolrSubscriberNotificationEvent.new(*args) end end |
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events.
78 79 80 |
# File 'lib/notes/rsolr_requests_note.rb', line 78 def events @events end |
Instance Method Details
#reset! ⇒ Object
89 90 91 |
# File 'lib/notes/rsolr_requests_note.rb', line 89 def reset! self.events.clear end |