Class: RuboCop::Cop::Refract::OrderedVisitMethods

Inherits:
Base
  • Object
show all
Extended by:
AutoCorrector
Defined in:
lib/rubocop/cop/refract/ordered_visit_methods.rb

Constant Summary collapse

MSG =
"Visit blocks should be sorted alphabetically by node type. Expected `visit %<expected>s` but found `visit %<actual>s`."

Instance Method Summary collapse

Instance Method Details

#on_class(node) ⇒ Object



11
12
13
14
15
16
# File 'lib/rubocop/cop/refract/ordered_visit_methods.rb', line 11

def on_class(node)
	visit_blocks = find_visit_blocks(node)
	return if visit_blocks.size < 2

	check_ordering(visit_blocks)
end