This cop checks how the *when*s of a case expression are indented in relation to its case or end keyword.
It will register a separate offense for each misaligned when.
# File lib/rubocop/cop/style/case_indentation.rb, line 12 def on_case(case_node) _condition, *whens, _else = *case_node base = style indent = cop_config['IndentOneStep'] base_column = base_column(case_node, base) whens.each do |when_node| check_when(when_node, case_node, base, indent, base_column) end end
Generated with the Darkfish Rdoc Generator 2.