<commit_before>require 'pg_search'
require 'ransack'

module Stradivari
  module Filter
    module Model

      module ScopeSearch
        def self.included(base)
          base.module_eval do
            include PgSearch
            extend ClassMethods
          end
        end

        module ClassMethods
          def stradivari_filter_options(options)
            @_stradivari_filter_options = options
            @_stradivari_filter_options
          end
          alias configure_scope_search stradivari_filter_options

          ##
          # Copy search options and scopes registry on inheritance
          #
          def inherited(subclass)
            super

            subclass.stradivari_filter_options(<commit_msg>Allow stradivari_filter_options to be used as a getter<commit_after>require 'pg_search'
require 'ransack'

module Stradivari
  module Filter
    module Model

      module ScopeSearch
        def self.included(base)
          base.module_eval do
            include PgSearch
            extend ClassMethods
          end
        end

        module ClassMethods
          def stradivari_filter_options(options = nil)
            @_stradivari_filter_options = options if options
            @_stradivari_filter_options
          end
          alias configure_scope_search stradivari_filter_options

          ##
          # Copy search options and scopes registry on inheritance
          #
          def inherited(subclass)
            super

            subclass.stradivari_filter_options(
{'fraction_non_alphanumeric': 0.032194480946123524, 'fraction_numerical': 0.0, 'mean_word_length': 1.9288461538461539, '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': '3423070', 'n_tokens_mistral': 398, 'n_tokens_neox': 382, 'n_words': 99}