<commit_before>module Origen
  module Controller
    extend ActiveSupport::Concern

    # Workaround due to reserved keywords in Ruby, Display in the case below.
    def display
      # If the DUT responds to a sub_block "display" return the sub_block
      if model.sub_blocks.include? 'display'
        Origen.log.success "Found a sub_block \'display\', passing control to the #{model.class}..."
        model.sub_blocks['display']
      else
        # Else, pass control to the ruby core.
        super
      end
    end

    module ClassMethods
      def model(options = {})
        options[:controller_class] = self
        if options[:path]
          @path_to_model = options[:path]
        else
          options[:model_class] = _resolve_model_class(options)
        end
        Origen.controllers << options
      end

      def path_to_model
        @path_to_model
      end

      def _resolve_model_class(options)
        class_name = options[:class_name]<commit_msg>Update controller.rb<commit_after>module Origen
  module Controller
    extend ActiveSupport::Concern

    # Workaround due to reserved keywords in Ruby, Display in the case below.
    def display
      # If the DUT responds to a sub_block "display" return the sub_block
      if model.sub_blocks.include? 'display'
        Origen.log.debug "Found a sub_block \'display\', passing control to the #{model.class}..."
        model.sub_blocks['display']
      else
        # Else, pass control to the ruby core.
        super
      end
    end

    module ClassMethods
      def model(options = {})
        options[:controller_class] = self
        if options[:path]
          @path_to_model = options[:path]
        else
          options[:model_class] = _resolve_model_class(options)
        end
        Origen.controllers << options
      end

      def path_to_model
        @path_to_model
      end

      def _resolve_model_class(options)
        class_name = options[:class_name]
{'fraction_non_alphanumeric': 0.07496175420703723, 'fraction_numerical': 0.0, 'mean_word_length': 2.3424190800681433, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2098528', 'n_tokens_mistral': 549, 'n_tokens_neox': 532, 'n_words': 162}