Sha256: 3cac4413af73f24fa24fdef626be86a4b6eec808d4fa334cbb1caf1a9d688a58
Contents?: true
Size: 465 Bytes
Versions: 9
Compression:
Stored size: 465 Bytes
Contents
# frozen_string_literal: true module FakerMaker # Base module for defining the DSL module Base def factory(name, options = {}, &block) factory = FakerMaker.find_factory(name) if factory.nil? factory = FakerMaker::Factory.new name, options proxy = DefinitionProxy.new factory proxy.instance_eval( &block ) if block_given? FakerMaker.register_factory factory else factory end end end end
Version data entries
9 entries across 9 versions & 1 rubygems