lib/rubocop/cop/style/word_array.rb in rubocop-0.18.1 vs lib/rubocop/cop/style/word_array.rb in rubocop-0.19.0

- old
+ new

@@ -6,20 +6,20 @@ # This cop checks for array literals made up of word-like # strings, that are not using the %w() syntax. class WordArray < Cop include ArraySyntax # The parameter is called MinSize (meaning the minimum array size for - # which an offence can be registered), but essentially it's a Max + # which an offense can be registered), but essentially it's a Max # parameter (the maximum number of something that's allowed). include ConfigurableMax MSG = 'Use %w or %W for array of words.' def on_array(node) array_elems = node.children if array_of?(:str, node) && !complex_content?(array_elems) && array_elems.size > min_size && !comments_in_array?(node) - add_offence(node, :expression) { self.max = array_elems.size } + add_offense(node, :expression) { self.max = array_elems.size } end end private