<commit_before>module NetSuite
  module Records
    class WorkOrderItemList
      include Support::Fields
      include Namespaces::TranInvt

      fields :item

      def initialize(attributes = {})
        initialize_from_attributes_hash(attributes)
      end

      def item=(items)
        case items
        when Hash
          self.items << WorkOrderItem.new(items)
        when Array
          items.each { |item| self.items << WorkOrderItem.new(item) }
        end
      end

      def items
        @items ||= []
      end

      def to_record
        { "#{record_namespace}:item" => items.map(&:to_record) }
      end
    end
  end
end<commit_msg>Refactor WorkOrderItemList to use Support::Sublist<commit_after>module NetSuite
  module Records
    class WorkOrderItemList < Support::Sublist
      include Namespaces::TranInvt

      sublist :item, WorkOrderItem

      alias :items :item
    end
  end
end
{'fraction_non_alphanumeric': 0.07650273224043716, 'fraction_numerical': 0.0, 'mean_word_length': 2.343065693430657, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2357365', 'n_tokens_mistral': 261, 'n_tokens_neox': 257, 'n_words': 65}