Module: Intercom::GenericHandlers::Count
- Included in:
- Count
- Defined in:
- lib/intercom/generic_handlers/count.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.count_breakdown_matcher ⇒ Object
46 47 48 |
# File 'lib/intercom/generic_handlers/count.rb', line 46 def self.count_breakdown_matcher /([[:alnum:]]+)_counts_for_each_([[:alnum:]]+)/ end |
.handles_method?(method_sym) ⇒ Boolean
50 51 52 |
# File 'lib/intercom/generic_handlers/count.rb', line 50 def self.handles_method?(method_sym) method_sym.to_s.end_with? '_count' or method_sym.to_s.match(count_breakdown_matcher) end |
.included(base) ⇒ Object
54 55 56 |
# File 'lib/intercom/generic_handlers/count.rb', line 54 def self.included(base) base.extend(ClassMethods) end |