# File lib/puppet-lint/data.rb, line 317 def array_indexes @array_indexes ||= Proc.new do arrays = [] tokens.each_with_index do |token, token_idx| if token.type == :LBRACK real_idx = 0 tokens[token_idx+1..-1].each_with_index do |cur_token, cur_token_idx| real_idx = token_idx + 1 + cur_token_idx break if cur_token.type == :RBRACK end # Ignore resource references next if token.prev_code_token && \ token.prev_code_token.type == :CLASSREF arrays << { :start => token_idx, :end => real_idx, :tokens => tokens[token_idx..real_idx], } end end arrays end.call end