Class: ImproveYourCode::SmellDetectors::UnusedPrivateMethod::Hit

Inherits:
Object
  • Object
show all
Defined in:
lib/improve_your_code/smell_detectors/unused_private_method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lineObject (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

#nameObject (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