<commit_before>module QED

  require 'qed/scope'

  # = Demonstrandum Evaluator
  class Evaluator

    #
    def initialize(script, *observers)
      @script  = script
      @steps   = script.parse

      #@file    = script.file
      #@scope   = script.scope
      #@binding = script.binding
      #@advice  = script.advice

      @observers = observers
    end

    #
    def run
      advise!(:before_demo, @script)
      run_steps
      advise!(:after_demo, @script)
    end

    #
    def run_steps #process
      @steps.each do |step|
        evaluate(step)
      end
    end

    #
    def evaluate(step)<commit_msg>add advice of :demo<commit_after>module QED

  require 'qed/scope'

  # = Demonstrandum Evaluator
  class Evaluator

    #
    def initialize(script, *observers)
      @script  = script
      @steps   = script.parse

      #@file    = script.file
      #@scope   = script.scope
      #@binding = script.binding
      #@advice  = script.advice

      @observers = observers
    end

    #
    def run
      advise!(:before_demo, @script)
      advise!(:demo, @script)
      run_steps
      advise!(:after_demo, @script)
    end

    #
    def run_steps #process
      @steps.each do |step|
        evaluate(step)
      end
    end

    #
    def evaluate(step)
{'fraction_non_alphanumeric': 0.09906396255850235, 'fraction_numerical': 0.0, 'mean_word_length': 1.956221198156682, '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': '73264', 'n_tokens_mistral': 435, 'n_tokens_neox': 420, 'n_words': 94}