<commit_before>require 'puppetfiler/mod'

module Puppetfiler
    class Puppetfile
        def initialize(path = 'Puppetfile')
            @modules    = {}
            @repos      = {}
            @puppetfile = path

            @maxlen_name = 0
            @maxlen_ver  = 0

            self.evaluate
        end

        def evaluate
            # TODO add error handling if target doesn't exist
            self.instance_eval(File.read(@puppetfile))
        end

        def maxlen_name
            @maxlen_name
        end

        def maxlen_ver<commit_msg>Use attr keyword to set getters<commit_after>require 'puppetfiler/mod'

module Puppetfiler
    class Puppetfile
        attr :modules
        attr :repos
        attr :puppetfile
        attr :maxlen_name

        def initialize(path = 'Puppetfile')
            @modules    = {}
            @repos      = {}
            @puppetfile = path

            @maxlen_name = 0
            @maxlen_ver  = 0

            self.evaluate
        end

        def evaluate
            # TODO add error handling if target doesn't exist
            self.instance_eval(File.read(@puppetfile))
        end

        def maxlen_ver
{'fraction_non_alphanumeric': 0.06399317406143344, 'fraction_numerical': 0.0034129692832764505, 'mean_word_length': 1.4539748953974896, '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': '4095970', 'n_tokens_mistral': 345, 'n_tokens_neox': 327, 'n_words': 82}