Class: ClassMetrix::Extractors::Services::Collection::MethodCollectionService
- Inherits:
-
Object
- Object
- ClassMetrix::Extractors::Services::Collection::MethodCollectionService
- Defined in:
- lib/class_metrix/extractors/services/collection/method_collection_service.rb
Overview
Service responsible for collecting method names from classes
Instance Method Summary collapse
- #collect_from_classes(classes) ⇒ Object
-
#initialize(options = {}) ⇒ MethodCollectionService
constructor
A new instance of MethodCollectionService.
Constructor Details
#initialize(options = {}) ⇒ MethodCollectionService
Returns a new instance of MethodCollectionService.
12 13 14 |
# File 'lib/class_metrix/extractors/services/collection/method_collection_service.rb', line 12 def initialize( = {}) @options = end |
Instance Method Details
#collect_from_classes(classes) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/class_metrix/extractors/services/collection/method_collection_service.rb', line 16 def collect_from_classes(classes) all_methods = Set.new classes.each do |klass| methods = collect_from_single_class(klass) all_methods.merge(methods.map(&:to_s)) end all_methods.to_a.sort end |