<commit_before>#FixerUpper
#Fixer::Upper
module Fixer #:nodoc:
  module Upper #:nodoc:

    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def fixer_upper(options={})
        extend Fixer::Upper::InstanceMethods
        exclude_both = options.key?(:exclude)      ? options[:exclude]      : []
        exclude_gets = options.key?(:exclude_gets) ? options[:exclude_gets] : []
        exclude_sets = options.key?(:exclude_sets) ? options[:exclude_sets] : []

        do_the_dew(exclude_both, exclude_gets, exclude_sets)
      end
    end

    module InstanceMethods

      def create_getter_method(name, orig_name)
        define_method(name.to_sym) { self.send(orig_name.to_sym) }
      end

      def create_setter_method(name, orig_name)
        define_method("#{name}=".to_sym) { |value| self.send("#{orig_name}=".to_sym, value) }
      end

      def do_the_dew(exclude_both, exclude_gets, exclude_sets)
        self.column_names.each do |column|
          new_prop = column.underscore
          if !(new_prop == column) and !(exclude_both.include?(column))
            create_getter_method(new_prop, column) unless exclude_gets.include?(column)
            create_setter_method(new_prop, column) unless exclude_sets.include?(column)
          end
        end
      end

    end

  end
end<commit_msg>changed method name to something a little more programmer friendly<commit_after>#FixerUpper
#Fixer::Upper
module Fixer #:nodoc:
  module Upper #:nodoc:

    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def fixer_upper(options={})
        extend Fixer::Upper::InstanceMethods
        exclude_both = options.key?(:exclude)      ? options[:exclude]      : []
        exclude_gets = options.key?(:exclude_gets) ? options[:exclude_gets] : []
        exclude_sets = options.key?(:exclude_sets) ? options[:exclude_sets] : []

        create_props(exclude_both, exclude_gets, exclude_sets)
      end
    end

    module InstanceMethods

      def create_getter_method(name, orig_name)
        define_method(name.to_sym) { self.send(orig_name.to_sym) }
      end

      def create_setter_method(name, orig_name)
        define_method("#{name}=".to_sym) { |value| self.send("#{orig_name}=".to_sym, value) }
      end

      def create_props(exclude_both, exclude_gets, exclude_sets)
        self.column_names.each do |column|
          new_prop = column.underscore
          if !(new_prop == column) and !(exclude_both.include?(column))
            create_getter_method(new_prop, column) unless exclude_gets.include?(column)
            create_setter_method(new_prop, column) unless exclude_sets.include?(column)
          end
        end
      end

    end

  end
end
{'fraction_non_alphanumeric': 0.1044613710554951, 'fraction_numerical': 0.0, 'mean_word_length': 3.020408163265306, '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': '6674125', 'n_tokens_mistral': 873, 'n_tokens_neox': 839, 'n_words': 162}