Class: Reek::Smells::ControlParameter::FoundControlParameter Private
- Inherits:
-
Object
- Object
- Reek::Smells::ControlParameter::FoundControlParameter
- 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 information about a single control parameter.
Instance Method Summary collapse
-
#initialize(param, occurences) ⇒ FoundControlParameter
constructor
private
A new instance of FoundControlParameter.
- #lines ⇒ Object private
- #name ⇒ Object private
- #smells? ⇒ Boolean private
Constructor Details
#initialize(param, occurences) ⇒ FoundControlParameter
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 FoundControlParameter.
70 71 72 73 |
# File 'lib/reek/smells/control_parameter.rb', line 70 def initialize(param, occurences) @param = param @occurences = occurences end |
Instance Method Details
#lines ⇒ 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.
79 80 81 |
# File 'lib/reek/smells/control_parameter.rb', line 79 def lines @occurences.map(&:line) end |
#name ⇒ 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.
83 84 85 |
# File 'lib/reek/smells/control_parameter.rb', line 83 def name @param.to_s end |
#smells? ⇒ Boolean
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.
75 76 77 |
# File 'lib/reek/smells/control_parameter.rb', line 75 def smells? @occurences.any? end |