module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector
:nodoc
Private Instance Methods
build_options_string(options)
click to toggle source
# File lib/rubocop/cop/rspec/factory_bot/create_list.rb, line 89 def build_options_string(options) options.map(&:source).join(', ') end
format_method_call(node, method, arguments)
click to toggle source
# File lib/rubocop/cop/rspec/factory_bot/create_list.rb, line 93 def format_method_call(node, method, arguments) if node.block_type? || node.parenthesized? "#{method}(#{arguments})" else "#{method} #{arguments}" end end
format_receiver(receiver)
click to toggle source
# File lib/rubocop/cop/rspec/factory_bot/create_list.rb, line 101 def format_receiver(receiver) return '' unless receiver "#{receiver.source}." end