Methods shouldn't be created at the top level like this; if helper methods are needed then they should be in a utility module. For example, https://github.com/puppetlabs/facter/blob/master/lib/facter/util/processor.rb#L212 . Alternately this can just be moved inside of one of the facts, and the other fact can just do `Facter.value('fact')`