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.



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

def initialize(analysed_module)
  @analysed_module = analysed_module
end

Instance Method Details

#countObject



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

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