Class: ActivePath::Subscribers::Subscriber
- Inherits:
-
Object
- Object
- ActivePath::Subscribers::Subscriber
- Defined in:
- lib/active_path/subscribers/subscriber.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#locals ⇒ Object
readonly
Returns the value of attribute locals.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
4 5 6 |
# File 'lib/active_path/subscribers/subscriber.rb', line 4 def buffer @buffer end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/active_path/subscribers/subscriber.rb', line 4 def context @context end |
#locals ⇒ Object (readonly)
Returns the value of attribute locals.
4 5 6 |
# File 'lib/active_path/subscribers/subscriber.rb', line 4 def locals @locals end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/active_path/subscribers/subscriber.rb', line 4 def @options end |
Instance Method Details
#call(name, started, finished, unique_id, payload) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/active_path/subscribers/subscriber.rb', line 9 def call(name, started, finished, unique_id, payload) @context = payload[:context] @buffer = payload[:buffer] @options = payload[:options] @locals = payload[:locals] perform and begin @context = @buffer = @options = @locals = nil end end |
#partial ⇒ Object
22 23 24 |
# File 'lib/active_path/subscribers/subscriber.rb', line 22 def partial .is_a?(Hash) ? [:partial] : .to_s end |
#perform ⇒ Object
26 27 28 |
# File 'lib/active_path/subscribers/subscriber.rb', line 26 def perform raise NotImplementedError end |