<commit_before>require 'json_report_builder/excel_report/object/base'
require 'json_report_builder/excel_report/object/row_object'
require 'json_report_builder/excel_report/object/merge_object'
require 'json_report_builder/excel_report/object/replace_value_object'

module JsonReportBuilder
  module ExcelReport
    module Object
      class SheetObject < Base
        attribute :template_sheet_name,   String
        attribute :output_sheet_name,     String
        attribute :output_sheet_hide,     Boolean, default: false
        attribute :new_name,              String,  default: ''
        attribute :print_col_index_start, Integer, default: -1
        attribute :print_col_index_end,   Integer, default: -1
        attribute :print_row_index_start, Integer, default: -1
        attribute :print_row_index_end,   Integer, default: -1
        attribute :rows,                  Array[RowObject]
        attribute :merges,                Array[MergeObject]
        attribute :replace_values,        Array[ReplaceValueObject]

        def create_row(args)
          args = args.merge(row_index: rows.size) if args[:row_index].blank?
          rows << (row = RowObject.new(args))
          row
        end

        def create_replace_value(args)
          args[:value] = '' if args[:value].nil? && args[:use_nil]
          replace_values << (replace_value = ReplaceValueObject.new(args))
          replace_value
        end
      end
    end
  end
end<commit_msg>判定が反対だった<commit_after>require 'json_report_builder/excel_report/object/base'
require 'json_report_builder/excel_report/object/row_object'
require 'json_report_builder/excel_report/object/merge_object'
require 'json_report_builder/excel_report/object/replace_value_object'

module JsonReportBuilder
  module ExcelReport
    module Object
      class SheetObject < Base
        attribute :template_sheet_name,   String
        attribute :output_sheet_name,     String
        attribute :output_sheet_hide,     Boolean, default: false
        attribute :new_name,              String,  default: ''
        attribute :print_col_index_start, Integer, default: -1
        attribute :print_col_index_end,   Integer, default: -1
        attribute :print_row_index_start, Integer, default: -1
        attribute :print_row_index_end,   Integer, default: -1
        attribute :rows,                  Array[RowObject]
        attribute :merges,                Array[MergeObject]
        attribute :replace_values,        Array[ReplaceValueObject]

        def create_row(args)
          args = args.merge(row_index: rows.size) if args[:row_index].blank?
          rows << (row = RowObject.new(args))
          row
        end

        def create_replace_value(args)
          args[:value] = '' if args[:value].nil? && !args[:use_nil]
          replace_values << (replace_value = ReplaceValueObject.new(args))
          replace_value
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08036935704514364, 'fraction_numerical': 0.0027359781121751026, 'mean_word_length': 2.716645489199492, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, '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': '5829437', 'n_tokens_mistral': 829, 'n_tokens_neox': 815, 'n_words': 175}