Class: ImproveYourCode::SmellDetectors::UnusedPrivateMethod::Hit
- Inherits:
-
Object
- Object
- ImproveYourCode::SmellDetectors::UnusedPrivateMethod::Hit
- Defined in:
- lib/improve_your_code/smell_detectors/unused_private_method.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(context) ⇒ Hit
constructor
A new instance of Hit.
Constructor Details
#initialize(context) ⇒ Hit
Returns a new instance of Hit.
15 16 17 18 |
# File 'lib/improve_your_code/smell_detectors/unused_private_method.rb', line 15 def initialize(context) @name = context.name @line = context.exp.line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
13 14 15 |
# File 'lib/improve_your_code/smell_detectors/unused_private_method.rb', line 13 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/improve_your_code/smell_detectors/unused_private_method.rb', line 13 def name @name end |