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: matrix_option_list.rb
    path of file: ./repos/netsuite/lib/netsuite/records
    
    the code of the file until where you have to start completion: module NetSuite
  module Records
    class MatrixOptionList
      include Namespaces::ListAcct

      # Deals with both hash and arrays of attributes[:matrix_option_list]
      #
      # Hash:
      #
      #   <listAcct:matrixOptionList>
      #     <listAcct:matrixOption internalId="47" scriptId="custitem15">
      #       <platformCore:v
    
      def initialize(attributes = {})
        case attributes[:matrix_option]
        when Hash
          options << OpenStruct.new(
            type_id: attributes[:matrix_option][:value][:'@type_id'],
            value_id: attributes[:matrix_option][:value][:'@internal_id'],
            script_id: attributes[:matrix_option][:@script_id],
            name: attributes[:matrix_option][:value][:name]
          )
        when Array
          attributes[:matrix_option].each do |option|
            options << OpenStruct.new(
              type_id: option[:value][:'@type_id'],
              value_id: option[:value][:'@internal_id'],
              script_id: option[:@script_id],
              name: option[:value][:name]
            )
          end
        end