Sha256: c675de56af3bafae57f0ec99ed4bf1d531c6c5467fb02e5303f28ccf958c0f93
Contents?: true
Size: 457 Bytes
Versions: 16
Compression:
Stored size: 457 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) # rubocop:disable Style/MissingRespondToMissing if respond_to?(name) nil else super end end def respond_to?(method) @methods_to_respond_to.include? method.to_s end end end
Version data entries
16 entries across 16 versions & 2 rubygems