Class: Rubyzen::Collections::MethodsCollection
- Inherits:
-
BaseCollection
- Object
- Array
- BaseCollection
- Rubyzen::Collections::MethodsCollection
- Includes:
- Providers::CollectionFilterProvider
- Defined in:
- lib/rubyzen/collections/methods_collection.rb
Overview
Collection of method declarations with access to parameters, call sites, if statements, rescues, and raises within each method.
Instance Method Summary collapse
-
#call_sites ⇒ CallSiteCollection
Returns all call sites across every method.
-
#if_statements ⇒ DeclarationCollection
Returns all if-statement declarations across every method.
-
#parameters ⇒ ParametersCollection
Returns all parameters across every method.
-
#raises ⇒ RaisesCollection
Returns all raise declarations across every method.
-
#rescues ⇒ RescuesCollection
Returns all rescue declarations across every method.
Methods included from Providers::CollectionFilterProvider
#with_name, #with_name_ending_with, #with_name_including, #with_name_starting_with, #without_name, #without_name_ending_with, #without_name_including, #without_name_starting_with
Methods inherited from BaseCollection
Instance Method Details
#call_sites ⇒ CallSiteCollection
Returns all call sites across every method.
36 37 38 39 40 41 42 |
# File 'lib/rubyzen/collections/methods_collection.rb', line 36 def call_sites CallSiteCollection.new( flat_map do |method| method.call_sites end ) end |
#if_statements ⇒ DeclarationCollection
Returns all if-statement declarations across every method.
25 26 27 28 29 30 31 |
# File 'lib/rubyzen/collections/methods_collection.rb', line 25 def if_statements DeclarationCollection.new( flat_map do |method| method.if_statements end ) end |
#parameters ⇒ ParametersCollection
Returns all parameters across every method.
14 15 16 17 18 19 20 |
# File 'lib/rubyzen/collections/methods_collection.rb', line 14 def parameters ParametersCollection.new( flat_map do |method| method.parameters end ) end |
#raises ⇒ RaisesCollection
Returns all raise declarations across every method.
58 59 60 61 62 63 64 |
# File 'lib/rubyzen/collections/methods_collection.rb', line 58 def raises RaisesCollection.new( flat_map do |method| method.raises end ) end |
#rescues ⇒ RescuesCollection
Returns all rescue declarations across every method.
47 48 49 50 51 52 53 |
# File 'lib/rubyzen/collections/methods_collection.rb', line 47 def rescues RescuesCollection.new( flat_map do |method| method.rescues end ) end |