@@ -289,12 +289,12 @@ def handle_meta_method_comment(comment, node)
289289
290290 if attributes
291291 attributes . each do |attr |
292- a = RDoc ::Attr . new ( @container , attr , rw , processed_comment , singleton : @singleton )
293- a . store = @store
294- a . line = line_no
295- record_location ( a )
296- @container . add_attribute ( a )
297- a . visibility = visibility
292+ attr_obj = RDoc ::Attr . new ( @container , attr , rw , processed_comment , singleton : @singleton )
293+ attr_obj . store = @store
294+ attr_obj . line = line_no
295+ record_location ( attr_obj )
296+ @container . add_attribute ( attr_obj )
297+ attr_obj . visibility = visibility
298298 end
299299 elsif line_no || node
300300 method_name ||= call_node_name_arguments ( node ) . first if is_call_node
@@ -401,13 +401,13 @@ def visible_tokens_from_location(location)
401401
402402 def change_method_visibility ( names , visibility , singleton : @singleton )
403403 new_methods = [ ]
404- @container . methods_matching ( names , singleton ) do |m |
405- if m . parent != @container
406- m = m . dup
407- record_location ( m )
408- new_methods << m
404+ @container . methods_matching ( names , singleton ) do |method |
405+ if method . parent != @container
406+ method = method . dup
407+ record_location ( method )
408+ new_methods << method
409409 else
410- m . visibility = visibility
410+ method . visibility = visibility
411411 end
412412 end
413413 new_methods . each do |method |
@@ -449,13 +449,13 @@ def add_alias_method(old_name, new_name, line_no)
449449 comment = consecutive_comment ( line_no )
450450 handle_consecutive_comment_directive ( @container , comment )
451451 visibility = @container . find_method ( old_name , @singleton ) &.visibility || :public
452- a = RDoc ::Alias . new ( nil , old_name , new_name , comment , singleton : @singleton )
453- handle_modifier_directive ( a , line_no )
454- a . store = @store
455- a . line = line_no
456- record_location ( a )
457- if should_document? ( a )
458- @container . add_alias ( a )
452+ alias_obj = RDoc ::Alias . new ( nil , old_name , new_name , comment , singleton : @singleton )
453+ handle_modifier_directive ( alias_obj , line_no )
454+ alias_obj . store = @store
455+ alias_obj . line = line_no
456+ record_location ( alias_obj )
457+ if should_document? ( alias_obj )
458+ @container . add_alias ( alias_obj )
459459 @container . find_method ( new_name , @singleton ) &.visibility = visibility
460460 end
461461 end
@@ -468,13 +468,13 @@ def add_attributes(names, rw, line_no)
468468 return unless @container . document_children
469469
470470 names . each do |symbol |
471- a = RDoc ::Attr . new ( nil , symbol . to_s , rw , comment , singleton : @singleton )
472- a . store = @store
473- a . line = line_no
474- record_location ( a )
475- handle_modifier_directive ( a , line_no )
476- @container . add_attribute ( a ) if should_document? ( a )
477- a . visibility = visibility # should set after adding to container
471+ attr_obj = RDoc ::Attr . new ( nil , symbol . to_s , rw , comment , singleton : @singleton )
472+ attr_obj . store = @store
473+ attr_obj . line = line_no
474+ record_location ( attr_obj )
475+ handle_modifier_directive ( attr_obj , line_no )
476+ @container . add_attribute ( attr_obj ) if should_document? ( attr_obj )
477+ attr_obj . visibility = visibility # should set after adding to container
478478 end
479479 end
480480
@@ -483,11 +483,11 @@ def add_includes_extends(names, rdoc_class, line_no) # :nodoc:
483483 comment = consecutive_comment ( line_no )
484484 handle_consecutive_comment_directive ( @container , comment )
485485 names . each do |name |
486- ie = @container . add ( rdoc_class , name , '' )
487- ie . store = @store
488- ie . line = line_no
489- ie . comment = comment
490- record_location ( ie )
486+ include_extend_obj = @container . add ( rdoc_class , name , '' )
487+ include_extend_obj . store = @store
488+ include_extend_obj . line = line_no
489+ include_extend_obj . comment = comment
490+ record_location ( include_extend_obj )
491491 end
492492 end
493493
@@ -652,10 +652,10 @@ def add_constant(constant_name, rhs_name, start_line, end_line)
652652 @container . find_module_named ( rhs_name )
653653 end
654654 if mod && constant . document_self
655- a = @container . add_module_alias ( mod , rhs_name , constant , @top_level )
656- a . store = @store
657- a . line = start_line
658- record_location ( a )
655+ module_alias = @container . add_module_alias ( mod , rhs_name , constant , @top_level )
656+ module_alias . store = @store
657+ module_alias . line = start_line
658+ record_location ( module_alias )
659659 end
660660 end
661661
0 commit comments