<commit_before>module PuppetX
  module Puppetlabs
    module Splunk
      module Type

        def self.clone_type(type)
          type.ensurable

          type.define_singleton_method(:title_patterns) do
            [
              [/^([^\/]*)$/,   [[:section]]],
              [/^(.*\/\/.*)$/, [[:section]]],
              [/^(.*)\/(.*)$/,
                [
                  [:section, lambda{|x| x}],
                  [:setting, lambda{|x| x}]
                ]
              ]
            ]
          end
          type.newproperty(:value) do
            desc 'The value of the setting to be defined.'
            munge do |v|
              v.to_s.strip
            end
          end
          type.newparam(:setting) do
             desc 'The setting being defined.'
             isnamevar
             munge do |v|
               v.to_s.strip
             end
           end
          type.newparam(:section) do
            desc 'The section the setting is defined under.'<commit_msg>rubocop: fix Style/SpaceInsideBlockBraces<commit_after>module PuppetX
  module Puppetlabs
    module Splunk
      module Type

        def self.clone_type(type)
          type.ensurable

          type.define_singleton_method(:title_patterns) do
            [
              [/^([^\/]*)$/,   [[:section]]],
              [/^(.*\/\/.*)$/, [[:section]]],
              [/^(.*)\/(.*)$/,
                [
                  [:section, lambda{ |x| x }],
                  [:setting, lambda{ |x| x }]
                ]
              ]
            ]
          end
          type.newproperty(:value) do
            desc 'The value of the setting to be defined.'
            munge do |v|
              v.to_s.strip
            end
          end
          type.newparam(:setting) do
             desc 'The setting being defined.'
             isnamevar
             munge do |v|
               v.to_s.strip
             end
           end
          type.newparam(:section) do
            desc 'The section the setting is defined under.'
{'fraction_non_alphanumeric': 0.12190287413280476, 'fraction_numerical': 0.0, 'mean_word_length': 1.0728952772073923, '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': '1198503', 'n_tokens_mistral': 572, 'n_tokens_neox': 538, 'n_words': 129}