Class: TablexiDev::Generators::RubocopGenerator

Inherits:
BaseGenerator
  • Object
show all
Defined in:
lib/generators/tablexi_dev/rubocop_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_gemObject



17
18
19
20
21
22
23
# File 'lib/generators/tablexi_dev/rubocop_generator.rb', line 17

def add_gem
  # Prevent us from adding the same gem directive multiple times
  # if the Gemfile already has 'rubocop' in a format other
  # than the exact format we expect.
  content = File.read("Gemfile")
  gem "rubocop", group: i[development test], require: false unless content.include?("rubocop")
end

#copy_filesObject



13
14
15
# File 'lib/generators/tablexi_dev/rubocop_generator.rb', line 13

def copy_files
  install_rubocop_config_files
end