lib/yamllint/linter.rb
# Add a key / value pair
Add a key / value pair
Add a key / value pair
def add_value(value, key)
        YamlLint.logger.debug { "add_value: #{value.inspect}, #{key.inspect}" }
        case @complex_type.last
        when :hash
          @key_components.push(key)
          check_for_overlap!
          @key_components.pop
        when :array
          @key_components.push(@array_positions.last)
          check_for_overlap!
          @array_positions[-1] += 1
          @key_components.pop
        end
      end
def add_value ( value , key ) YamlLint . logger . debug { "add_value: #{value.inspect}, #{key.inspect}" } case @complex_type . last when :hash @key_components . push ( key ) check_for_overlap! @key_components . pop when :array @key_components . push ( @array_positions . last ) check_for_overlap! @array_positions [ - 1 ] += 1 @key_components . pop end end
Add a key / value pair
Add a key / value pair
value
key