Sha256: ecc03adc586e4326d24668705d5deedc135914a6e022eabc5b5a6d3081fd321b
Contents?: true
Size: 647 Bytes
Versions: 19
Compression:
Stored size: 647 Bytes
Contents
# frozen_string_literal: true require_relative 'default' require_relative '../helpers/hash' module NanoBot module Logic module Cartridge module Fetch def self.cascate(cartridge, paths) results = paths.map { |path| Helpers::Hash.fetch(cartridge, path) } result = results.find { |candidate| !candidate.nil? } return result unless result.nil? results = paths.map { |path| Helpers::Hash.fetch(Default.instance.values, path) } result = results.find { |candidate| !candidate.nil? } return result unless result.nil? nil end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems