<commit_before>require 'trooper/action'

module Trooper
  module Actions

    class DefaultAction < Action

      class << self
        attr_accessor :config

        %w(name description).each do |method|
          define_method(method) do |value| 
            self.config = {} unless self.config
            self.config[method.to_sym] = value
          end
        end
      end

      def initialize(config = {})
        @name = self.class.config[:name]
        @description = self.class.config[:description]
        @config = config
        @commands = []
      end

      def call(configuration)
        @config = configuration
        build_commands
        commands
      end

      private

      def build_commands
        nil
      end
      
    end

  end
end<commit_msg>default actions can now accept options too<commit_after>require 'trooper/action'

module Trooper
  module Actions

    class DefaultAction < Action

      class << self
        attr_accessor :config

        %w(name description).each do |method|
        %w(name description options).each do |method|
          define_method(method) do |value| 
            self.config = {} unless self.config
            self.config[method.to_sym] = value
          end
        end
      end

      def initialize(config = {})
        @name = self.class.config[:name]
        @description = self.class.config[:description]
        @options = self.class.config[:options] || {}
        @config = config
        @commands = []
      end

      def call(configuration)
        @config = configuration
        build_commands
        commands
      end

      private

      def build_commands
        nil
      end
      
    end

  end
end
{'fraction_non_alphanumeric': 0.07941176470588235, 'fraction_numerical': 0.0, 'mean_word_length': 1.7613636363636365, 'pattern_counts': {'":': 0, '<': 9, '<?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': '5920905', 'n_tokens_mistral': 460, 'n_tokens_neox': 439, 'n_words': 118}