Class: ActiveSupport::Notifications::Fanout::Subscribers::Evented
- Defined in:
- lib/active_support/notifications/fanout.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
- #finish(name, id, payload) ⇒ Object
-
#initialize(pattern, delegate) ⇒ Evented
constructor
A new instance of Evented.
- #matches?(name) ⇒ Boolean
- #publish(name, *args) ⇒ Object
- #start(name, id, payload) ⇒ Object
- #subscribed_to?(name) ⇒ Boolean
- #unsubscribe!(name) ⇒ Object
Constructor Details
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
141 142 143 |
# File 'lib/active_support/notifications/fanout.rb', line 141 def pattern @pattern end |
Instance Method Details
#finish(name, id, payload) ⇒ Object
159 160 161 |
# File 'lib/active_support/notifications/fanout.rb', line 159 def finish(name, id, payload) @delegate.finish name, id, payload end |
#matches?(name) ⇒ Boolean
167 168 169 |
# File 'lib/active_support/notifications/fanout.rb', line 167 def matches?(name) pattern && pattern === name end |
#publish(name, *args) ⇒ Object
149 150 151 152 153 |
# File 'lib/active_support/notifications/fanout.rb', line 149 def publish(name, *args) if @can_publish @delegate.publish name, *args end end |
#start(name, id, payload) ⇒ Object
155 156 157 |
# File 'lib/active_support/notifications/fanout.rb', line 155 def start(name, id, payload) @delegate.start name, id, payload end |
#subscribed_to?(name) ⇒ Boolean
163 164 165 |
# File 'lib/active_support/notifications/fanout.rb', line 163 def subscribed_to?(name) pattern === name end |
#unsubscribe!(name) ⇒ Object
171 172 173 |
# File 'lib/active_support/notifications/fanout.rb', line 171 def unsubscribe!(name) pattern.unsubscribe!(name) end |