Sha256: 2f8f5bc5e74a4e99c878358080bc410b6b64ae81e7f8baeef26c5e5dfce3db01
Contents?: true
Size: 784 Bytes
Versions: 2
Compression:
Stored size: 784 Bytes
Contents
# frozen_string_literal: true module Trailblazer class Finder module Base def self.included(base) base.include Helpers::Basic base.include Helpers::Sorting base.extend Finder::Dsl end attr_reader :signal, :errors def initialize(options = {}) # rubocop:disable Style/OptionHash config = self.class.config ctx = {config: config, options: options} @signal, (ctx, *) = Activities::Find.call([ctx, {}]) @options = options @errors = ctx[:errors] || {} @find = ctx[:finder] end def fetch_result result = @find.query self result = Utils::Array.convert_hashes_in_array_to_struct(result) if result.first.is_a?(Hash) result end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trailblazer-finder-0.92.0 | lib/trailblazer/finder/base.rb |
trailblazer-finder-0.91.0 | lib/trailblazer/finder/base.rb |