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.21 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.20 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.19 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.18 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.17 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.16 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.15 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.14 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.13 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.12 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.11 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.10 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.9 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.8 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.7 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.6 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.5 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.4 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.3 lib/eco/api/microcases/strict_search.rb
eco-helpers-3.0.2 lib/eco/api/microcases/strict_search.rb