Sha256: bdaf20a919e87d49e25933f3cc333de309d9bedb720264234f8d9d3c6f9c6688
Contents?: true
Size: 463 Bytes
Versions: 11
Compression:
Stored size: 463 Bytes
Contents
module FactoryBot # @api private class StrategyCalculator def initialize(name_or_object) @name_or_object = name_or_object end def strategy if strategy_is_object? @name_or_object else strategy_name_to_object end end private def strategy_is_object? @name_or_object.is_a?(Class) end def strategy_name_to_object FactoryBot.strategy_by_name(@name_or_object) end end end
Version data entries
11 entries across 11 versions & 1 rubygems