<commit_before># frozen_string_literal: true

Gtk.load_class :Container
module Gtk
  # Overrides for GtkContainer
  class Container
    def add_with_properties(widget, properties)
      add widget
      properties.each do |property_name, value|
        child_set_property widget, property_name.to_s, value
      end
    end

    setup_instance_method :child_get_property

    def child_get_property_with_override(widget, property_name)
      param_spec = object_class.find_child_property property_name
      unless param_spec
        raise ArgumentError,
          "child property named '#{property_name}' not found in #{self.class}"
      end
      gtype = param_spec.value_type
      gvalue = GObject::Value.for_gtype gtype

      child_get_property_without_override widget, property_name, gvalue
      gvalue.get_value
    end

    alias child_get_property_without_override child_get_property
    alias child_get_property child_get_property_with_override
  end
end<commit_msg>Fix alignment<commit_after># frozen_string_literal: true

Gtk.load_class :Container
module Gtk
  # Overrides for GtkContainer
  class Container
    def add_with_properties(widget, properties)
      add widget
      properties.each do |property_name, value|
        child_set_property widget, property_name.to_s, value
      end
    end

    setup_instance_method :child_get_property

    def child_get_property_with_override(widget, property_name)
      param_spec = object_class.find_child_property property_name
      unless param_spec
        raise(ArgumentError,
              "child property named '#{property_name}' not found in #{self.class}")
      end
      gtype = param_spec.value_type
      gvalue = GObject::Value.for_gtype gtype

      child_get_property_without_override widget, property_name, gvalue
      gvalue.get_value
    end

    alias child_get_property_without_override child_get_property
    alias child_get_property child_get_property_with_override
  end
end
{'fraction_non_alphanumeric': 0.04686704024452369, 'fraction_numerical': 0.0, 'mean_word_length': 3.778588807785888, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1526598', 'n_tokens_mistral': 569, 'n_tokens_neox': 563, 'n_words': 133}