<commit_before>module Hancock
  class Tab < Hancock::Base
    attr_accessor :type, :label, :page_number, :coordinates, :optional, :required
    attr_reader :width, :font_size, :validation_pattern, :validation_message, :shared

    AVAILABLE_FONT_SIZES = [7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72]

    # TODO: These validations aren't actually being called, perhaps they should be
    validates :type, presence: true
    validates :page_number, numericality: { greater_than: 0, only_integer: true }

    def initialize(attributes = {})
      @type               = attributes[:type]
      @label              = attributes[:label]
      @coordinates        = attributes[:coordinates] || [0, 0]
      @page_number        = attributes[:page_number] || 1
      @validation_pattern = attributes[:validation_pattern]
      @validation_message = attributes[:validation_message]
      @width              = attributes[:width]
      @shared             = attributes[:shared]
      @font_size          = attributes[:font_size]
      @optional           = attributes[:optional].to_s unless attributes[:optional].nil? # for Signer Attachment Tag
      @required           = attributes[:required].to_s unless attributes[:required].nil? # for Text tag
<commit_msg>shared.to_s<commit_after>module Hancock
  class Tab < Hancock::Base
    attr_accessor :type, :label, :page_number, :coordinates, :optional, :required
    attr_reader :width, :font_size, :validation_pattern, :validation_message, :shared

    AVAILABLE_FONT_SIZES = [7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72]

    # TODO: These validations aren't actually being called, perhaps they should be
    validates :type, presence: true
    validates :page_number, numericality: { greater_than: 0, only_integer: true }

    def initialize(attributes = {})
      @type               = attributes[:type]
      @label              = attributes[:label]
      @coordinates        = attributes[:coordinates] || [0, 0]
      @page_number        = attributes[:page_number] || 1
      @validation_pattern = attributes[:validation_pattern]
      @validation_message = attributes[:validation_message]
      @width              = attributes[:width]
      @font_size          = attributes[:font_size]
      @optional           = attributes[:optional].to_s unless attributes[:optional].nil? # for Signer Attachment Tag
      @required           = attributes[:required].to_s unless attributes[:required].nil? # for Text tag
      @shared             = attributes[:shared].to_s unless attributes[:shared].nil?

{'fraction_non_alphanumeric': 0.11205893757270259, 'fraction_numerical': 0.027142303218301668, 'mean_word_length': 3.043887147335423, 'pattern_counts': {'":': 0, '<': 5, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3555038', 'n_tokens_mistral': 785, 'n_tokens_neox': 706, 'n_words': 194}