Class: Docquet::Generators::RuboCopYMLGenerator
- Inherits:
-
Object
- Object
- Docquet::Generators::RuboCopYMLGenerator
- Defined in:
- lib/docquet/generators/rubocop_yml_generator.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize ⇒ RuboCopYMLGenerator
constructor
A new instance of RuboCopYMLGenerator.
Constructor Details
#initialize ⇒ RuboCopYMLGenerator
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
#generate ⇒ Object
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 |