<commit_before>module Cognizant
  class Process
    module Triggers
      class Transition < Trigger
        def initialize(options = {}, &block)
          @from = [*options[:from]]
          @to = [*options[:to]]
          @do = block
        end

        def notify(transition)
          if @from.include?(transition.from_name) and @to.include?(transition.to_name)
            @do.call if @do and @do.respond_to?(:call)
          end
        end

        def reset!
        end
      end<commit_msg>Send the process as an argument to transition block<commit_after>module Cognizant
  class Process
    module Triggers
      class Transition < Trigger
        def initialize(options = {}, &block)
          @from = [*options[:from]]
          @to = [*options[:to]]
          @do = block
        end

        def notify(transition)
          if @from.include?(transition.from_name) and @to.include?(transition.to_name)
            @do.call(@delegate.process) if @do and @do.respond_to?(:call)
          end
        end

        def reset!
        end
      end
{'fraction_non_alphanumeric': 0.10387157695939565, 'fraction_numerical': 0.0, 'mean_word_length': 1.9120879120879122, 'pattern_counts': {'":': 0, '<': 5, '<?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': '518279', 'n_tokens_mistral': 302, 'n_tokens_neox': 297, 'n_words': 79}