Class: SuperPoller::Handler
- Inherits:
-
Object
- Object
- SuperPoller::Handler
- Defined in:
- lib/super_poller/handler.rb
Direct Known Subclasses
Defined Under Namespace
Classes: TestCase
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.handles(*new_message_names) ⇒ Object
5 6 7 |
# File 'lib/super_poller/handler.rb', line 5 def handles(*) @message_names = ( + ).uniq end |
.message_names ⇒ Object
9 10 11 |
# File 'lib/super_poller/handler.rb', line 9 def @message_names || [] end |
Instance Method Details
#call(message) ⇒ Object
18 19 20 |
# File 'lib/super_poller/handler.rb', line 18 def call() raise NotImplementedError, "You must define a call handler." end |
#can_handle?(message) ⇒ Boolean
14 15 16 |
# File 'lib/super_poller/handler.rb', line 14 def can_handle?() self.class..include? [:name].to_sym end |