Class: RubyCritic::MethodsCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/analysers/helpers/methods_counter.rb

Instance Method Summary collapse

Constructor Details

#initialize(analysed_module) ⇒ MethodsCounter

Returns a new instance of MethodsCounter.



6
7
8
# File 'lib/rubycritic/analysers/helpers/methods_counter.rb', line 6

def initialize(analysed_module)
  @analysed_module = analysed_module
end

Instance Method Details

#countObject



10
11
12
# File 'lib/rubycritic/analysers/helpers/methods_counter.rb', line 10

def count
  node.count_nodes_of_type(:def, :defs)
end