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.



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

#countObject



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

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