Sha256: 4ccd34e8a4b5643ba38e1adb3768db673b7d9add14c8cb653ccb2c306dbb2aa2
Contents?: true
Size: 386 Bytes
Versions: 9
Compression:
Stored size: 386 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # Common code for ordinary arrays with [] that can be written with % # syntax. module ArraySyntax def bracketed_array_of?(element_type, node) return false unless node.square_brackets? && node.values.size > 1 node.values.all? { |value| value.type == element_type } end end end end
Version data entries
9 entries across 9 versions & 1 rubygems