You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rgb.rb
    path of file: ./repos/psd.rb/lib/psd/image_modes
    
    the code of the file until where you have to start completion: class PSD
  module ImageMode
    # Combines the channel data from the image into RGB pixel values
    module RGB
      private

      def set_rgb_channels
        @channels_info = [
          { id: 0 },
          { id: 1 },
          { id: 2 }
        ]

        @channels_info << {id
    
      def combine_rgb_channel
        PSD.logger.debug "Beginning RGB processing"

        rgb_channels = @channels_info.
          map    { |ch| ch[:id] }.
          reject { |ch| ch < -1 }

        (0...@num_pixels).step(pixel_step) do |i|
          r = g = b = 0
          a = 255

          rgb_channels.each_with_index do |chan, index|
            val = @channel_data[i + (@channel_length * index)]

            case chan
            when -1 then  a = val
            when 0 then   r = val
            when 1 then   g = val
            when 2 then   b = val
            end
          end

          @pixel_data.push ChunkyPNG::Color.rgba(r, g, b, a)
        end