Sha256: aeda2e77a70321726c0b0c9290a36c20dcc4ff244299542b1d55a9144a9ce369

Contents?: true

Size: 832 Bytes

Versions: 23

Compression:

Stored size: 832 Bytes

Contents

module Eco
  module API
    class MicroCases
      # When trying to find an `person` with given a source `entry`, it states if such a search should be `strict` or `soft`.
      # @note
      #   - `strict` searches ignore the email when the source `entry` has an `external_id` specified.
      #   - see related command line options `-search-strict` and `-search-soft`
      # @param options [Hash] the options.
      # @return [Boolean] `true` if the search should be `strict` only, and `false` otherwise.
      def strict_search?(options)
        strict_config  = session.config.people.strict_search?
        strict_option  = options.dig(:search, :strict)
        soft_option    = options.dig(:search, :soft) && !strict_option
        (strict_config || strict_option) && !soft_option
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
eco-helpers-3.0.1 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.0 lib/eco/api/microcases/strict_search.rb
eco-helpers-2.7.25 lib/eco/api/microcases/strict_search.rb