Module: StartHer::Subscriber::ClassMethods
- Defined in:
- lib/start_her/subscriber.rb
Instance Attribute Summary collapse
-
#subscriber_error_block ⇒ Object
Returns the value of attribute subscriber_error_block.
-
#subscriber_heartbeat_block ⇒ Object
Returns the value of attribute subscriber_heartbeat_block.
-
#subscriber_on_psubscribe_block ⇒ Object
Returns the value of attribute subscriber_on_psubscribe_block.
-
#subscriber_options_hash ⇒ Object
Returns the value of attribute subscriber_options_hash.
Instance Method Summary collapse
- #run! ⇒ Object
- #subscriber_error(&block) ⇒ Object
- #subscriber_heartbeat(&block) ⇒ Object
- #subscriber_on_psubscribe(&block) ⇒ Object
- #subscriber_options(opts = {}) ⇒ Object
Instance Attribute Details
#subscriber_error_block ⇒ Object
Returns the value of attribute subscriber_error_block.
18 19 20 |
# File 'lib/start_her/subscriber.rb', line 18 def subscriber_error_block @subscriber_error_block end |
#subscriber_heartbeat_block ⇒ Object
Returns the value of attribute subscriber_heartbeat_block.
18 19 20 |
# File 'lib/start_her/subscriber.rb', line 18 def subscriber_heartbeat_block @subscriber_heartbeat_block end |
#subscriber_on_psubscribe_block ⇒ Object
Returns the value of attribute subscriber_on_psubscribe_block.
18 19 20 |
# File 'lib/start_her/subscriber.rb', line 18 def subscriber_on_psubscribe_block @subscriber_on_psubscribe_block end |
#subscriber_options_hash ⇒ Object
Returns the value of attribute subscriber_options_hash.
18 19 20 |
# File 'lib/start_her/subscriber.rb', line 18 def @subscriber_options_hash end |
Instance Method Details
#run! ⇒ Object
21 22 23 |
# File 'lib/start_her/subscriber.rb', line 21 def run! new([:channels]).run! end |
#subscriber_error(&block) ⇒ Object
33 34 35 |
# File 'lib/start_her/subscriber.rb', line 33 def subscriber_error(&block) self.subscriber_error_block = block end |
#subscriber_heartbeat(&block) ⇒ Object
25 26 27 |
# File 'lib/start_her/subscriber.rb', line 25 def subscriber_heartbeat(&block) self.subscriber_heartbeat_block = block end |
#subscriber_on_psubscribe(&block) ⇒ Object
29 30 31 |
# File 'lib/start_her/subscriber.rb', line 29 def subscriber_on_psubscribe(&block) self.subscriber_on_psubscribe_block = block end |
#subscriber_options(opts = {}) ⇒ Object
37 38 39 |
# File 'lib/start_her/subscriber.rb', line 37 def (opts = {}) self. = DEFAULT_OPTS.merge(opts) end |