Class: RDist::Analyzer::NumMethodsInClass
- Defined in:
- lib/rdist/analyzer/nummethodsinclass.rb
Instance Attribute Summary
Attributes inherited from Base
#histogram_interval, #pattern_close_token, #pattern_count_target, #pattern_open_token
Instance Method Summary collapse
-
#initialize ⇒ NumMethodsInClass
constructor
A new instance of NumMethodsInClass.
Methods inherited from Base
#__set_state_in_block__, #add_count_of, #allow_nesting?, #analyze, #analyze_all, #deny_nesting?, #histogram, #ranking, #reset, #set_state_in_block
Constructor Details
#initialize ⇒ NumMethodsInClass
Returns a new instance of NumMethodsInClass.
4 5 6 7 8 9 |
# File 'lib/rdist/analyzer/nummethodsinclass.rb', line 4 def initialize open_tokens = %w{module class} pattern_open_tokens = Regexp.union(*open_tokens) super(pattern_open_tokens, /(?:^|[^\w]+) def [^\w]+/nxm, /end/, RDist::ALLOW_NESTING) end |