class RubocopDbl::Generators::InstallGenerator
Public Instance Methods
create_config_file()
click to toggle source
# File lib/generators/rubocop_dbl/install_generator.rb, line 9 def create_config_file file_method = config_file_exists? ? :prepend : :create send :"#{file_method}_file", config_file_path, config_file_content end
Private Instance Methods
config_file_content()
click to toggle source
# File lib/generators/rubocop_dbl/install_generator.rb, line 24 def config_file_content <<~HEREDOC inherit_gem: rubocop-dbl: - config/dbl.yml HEREDOC end
config_file_exists?()
click to toggle source
# File lib/generators/rubocop_dbl/install_generator.rb, line 16 def config_file_exists? File.exist?(config_file_path) end
config_file_path()
click to toggle source
# File lib/generators/rubocop_dbl/install_generator.rb, line 20 def config_file_path '.rubocop.yml' end