Class: Trek::Generators::Install::RubocopGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Helpers
Defined in:
lib/generators/trek/install/rubocop_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_gemObject



14
15
16
17
18
19
# File 'lib/generators/trek/install/rubocop_generator.rb', line 14

def add_gem
  return if in_gemfile?("rubocop-rspec")

  gem "rubocop-rspec", group: [:development, :test], require: false
  bundle_install
end

#copy_rubocop_configObject



21
22
23
# File 'lib/generators/trek/install/rubocop_generator.rb', line 21

def copy_rubocop_config
  copy_file_at_root ".rubocop.yml"
end