Sha256: c5871de22a8b4f99e08eb47afecd22f310ee46fa1d7bf7ec7cb16da93e0e5352
Contents?: true
Size: 523 Bytes
Versions: 14
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true module FactoryBotRails class DefinitionFilePaths def initialize(definition_file_paths) @files = [] @directories = {} definition_file_paths.each do |path| @files << "#{path}.rb" @directories[path.to_s] = [:rb] end end def directories @directories.select { |path| Dir.exist?(path) } end def files @files.select { |file| File.exist?(file) } end def any? directories.any? || files.any? end end end
Version data entries
14 entries across 13 versions & 2 rubygems