<commit_before>require 'uri'
require 'active_support'
require 'active_support/core_ext/string/starts_ends_with'

require 'roxml/definition'
require 'roxml/xml'

module ROXML # :nodoc:
  VERSION = '3.1.5'

  def self.included(base) # :nodoc:
    base.class_eval do
      extend  ClassMethods::Accessors,
              ClassMethods::Declarations,
              ClassMethods::Operations
      include InstanceMethods

      attr_accessor :roxml_references
    end
  end

  module InstanceMethods # :nodoc:
    # Returns an XML object representing this object
    def to_xml(params = {})
      params.reverse_merge!(:name => self.class.tag_name, :namespace => self.class.roxml_namespace)
      params[:namespace] = nil if ['*', 'xmlns'].include?(params[:namespace])
      XML.new_node([params[:namespace], params[:name]].compact.join(':')).tap do |root|
        refs = (self.roxml_references.present? \
          ? self.roxml_references \<commit_msg>include more of active support 3.0<commit_after>require 'uri'
require 'active_support'
require 'active_support/core_ext'

require 'roxml/definition'
require 'roxml/xml'

module ROXML # :nodoc:
  VERSION = '3.1.5'

  def self.included(base) # :nodoc:
    base.class_eval do
      extend  ClassMethods::Accessors,
              ClassMethods::Declarations,
              ClassMethods::Operations
      include InstanceMethods

      attr_accessor :roxml_references
    end
  end

  module InstanceMethods # :nodoc:
    # Returns an XML object representing this object
    def to_xml(params = {})
      params.reverse_merge!(:name => self.class.tag_name, :namespace => self.class.roxml_namespace)
      params[:namespace] = nil if ['*', 'xmlns'].include?(params[:namespace])
      XML.new_node([params[:namespace], params[:name]].compact.join(':')).tap do |root|
        refs = (self.roxml_references.present? \
          ? self.roxml_references \
{'fraction_non_alphanumeric': 0.12228692429857067, 'fraction_numerical': 0.004235044997353097, 'mean_word_length': 3.5107398568019095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, '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': '3981289', 'n_tokens_mistral': 586, 'n_tokens_neox': 581, 'n_words': 119}