Class: Reek::Smells::ControlParameter::ControlParameterCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/reek/smells/control_parameter.rb

Overview

Collects all control parameters in a given context.

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ ControlParameterCollector

Returns a new instance of ControlParameterCollector


164
165
166
# File 'lib/reek/smells/control_parameter.rb', line 164

def initialize(context)
  @context = context
end

Instance Method Details

#control_parametersObject


168
169
170
171
172
# File 'lib/reek/smells/control_parameter.rb', line 168

def control_parameters
  potential_parameters.
    map { |param| FoundControlParameter.new(param, find_matches(param)) }.
    select(&:smells?)
end