Sha256: 6258edf53e889dae5fa2f22d88aca4721ff9a4aa323face179a684b87af80019
Contents?: true
Size: 487 Bytes
Versions: 9
Compression:
Stored size: 487 Bytes
Contents
module FactoryBot # @api private class NullObject < ::BasicObject def initialize(methods_to_respond_to) @methods_to_respond_to = methods_to_respond_to.map(&:to_s) end def method_missing(name, *args, &block) if respond_to?(name) nil else super end end def respond_to?(method, _include_private = false) @methods_to_respond_to.include? method.to_s end def respond_to_missing?(*) false end end end
Version data entries
9 entries across 9 versions & 1 rubygems