Module: RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly
Overview
Handles ‘ExplicitOnly` configuration parameters.
Constant Summary
FactoryBot::Language::METHODS
Instance Method Summary
collapse
#factory_bot?
Instance Method Details
#explicit_only? ⇒ Boolean
16
17
18
|
# File 'lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb', line 16
def explicit_only?
cop_config['ExplicitOnly']
end
|
#factory_call?(node) ⇒ Boolean
10
11
12
13
14
|
# File 'lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb', line 10
def factory_call?(node)
return factory_bot?(node) if explicit_only?
factory_bot?(node) || node.nil?
end
|