This cop checks for array literals made up of word-like strings, that are not using the %w() syntax.
# File lib/rubocop/cop/style/word_array.rb, line 16 def on_array(node) array_elems = node.children return unless array_of?(:str, node) && !complex_content?(array_elems) && array_elems.size > min_size && !comments_in_array?(node) add_offense(node, :expression) { self.max = array_elems.size } end
Generated with the Darkfish Rdoc Generator 2.