Class: Reek::Smells::ControlParameter::ControlParameterCollector Private
- Inherits:
-
Object
- Object
- Reek::Smells::ControlParameter::ControlParameterCollector
- Defined in:
- lib/reek/smells/control_parameter.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Collects all control parameters in a given context.
Instance Method Summary collapse
- #control_parameters ⇒ Object private
-
#initialize(context) ⇒ ControlParameterCollector
constructor
private
A new instance of ControlParameterCollector.
Constructor Details
#initialize(context) ⇒ ControlParameterCollector
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ControlParameterCollector.
166 167 168 |
# File 'lib/reek/smells/control_parameter.rb', line 166 def initialize(context) @context = context end |
Instance Method Details
#control_parameters ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
170 171 172 173 174 |
# File 'lib/reek/smells/control_parameter.rb', line 170 def control_parameters potential_parameters. map { |param| FoundControlParameter.new(param, find_matches(param)) }. select(&:smells?) end |