Class: RubyCritic::MethodsCounter
- Inherits:
-
Object
- Object
- RubyCritic::MethodsCounter
- Defined in:
- lib/rubycritic/analysers/helpers/methods_counter.rb
Instance Method Summary collapse
- #count ⇒ Object
-
#initialize(analysed_module) ⇒ MethodsCounter
constructor
A new instance of MethodsCounter.
Constructor Details
#initialize(analysed_module) ⇒ MethodsCounter
Returns a new instance of MethodsCounter.
7 8 9 |
# File 'lib/rubycritic/analysers/helpers/methods_counter.rb', line 7 def initialize(analysed_module) @analysed_module = analysed_module end |
Instance Method Details
#count ⇒ Object
11 12 13 |
# File 'lib/rubycritic/analysers/helpers/methods_counter.rb', line 11 def count node.count_nodes_of_type(:def, :defs) end |