class RuboCop::Cop::Layout::AlignArray
Here we check if the elements of a multi-line array literal are aligned.
@example
# bad a = [1, 2, 3, 4, 5, 6] array = ['run', 'forrest', 'run'] # good a = [1, 2, 3, 4, 5, 6] a = ['run', 'forrest', 'run']
Constants
- MSG
Public Instance Methods
on_array(node)
click to toggle source
# File lib/rubocop/cop/layout/align_array.rb, line 29 def on_array(node) check_alignment(node.children) end