<commit_before>require 'resolv'

module Puppet::Parser::Functions
  newfunction(:all_host_ipv4, :type => :rvalue) do
    interfaces = lookupvar('interfaces').split(',')
    ipaddresses = []
    interfaces.each do |interface|
      next if interface.eql? 'lo'
      ip = lookupvar("ipaddress_#{interface}")
      ipaddresses << ip if !!(ip =~ Resolv::IPv4::Regex)
    end

    ipaddresses
  end
end<commit_msg>add args to custorm function<commit_after>require 'resolv'

module Puppet::Parser::Functions
  newfunction(:all_host_ipv4, :type => :rvalue) do |args|
    interfaces = lookupvar('interfaces').split(',')
    ipaddresses = []
    interfaces.each do |interface|
      next if interface.eql? 'lo'
      ip = lookupvar("ipaddress_#{interface}")
      ipaddresses << ip if !!(ip =~ Resolv::IPv4::Regex)
    end

    ipaddresses
  end
end
{'fraction_non_alphanumeric': 0.14047619047619048, 'fraction_numerical': 0.004761904761904762, 'mean_word_length': 3.947058823529412, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '415528', 'n_tokens_mistral': 281, 'n_tokens_neox': 288, 'n_words': 62}