Class: Docquet::Generators::RuboCopYMLGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/docquet/generators/rubocop_yml_generator.rb

Instance Method Summary collapse

Constructor Details

#initializeRuboCopYMLGenerator

Returns a new instance of RuboCopYMLGenerator.



8
9
10
11
12
# File 'lib/docquet/generators/rubocop_yml_generator.rb', line 8

def initialize
  @inflector = Inflector.instance
  @detected_plugin_names = PluginDetector.detect_plugin_names
  @filtered_configs = filtered_config_files
end

Instance Method Details

#generateObject



14
15
16
17
# File 'lib/docquet/generators/rubocop_yml_generator.rb', line 14

def generate
  content = ERB.new(File.read(template_path("rubocop.yml.erb")), trim_mode: "-").result(binding)
  File.write(".rubocop.yml", content)
end