Class: Rubocop::Numbered::Params::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- Rubocop::Numbered::Params::Plugin
- Defined in:
- lib/rubocop/numbered/params/plugin.rb,
sig/rubocop/numbered/params/plugin.rbs
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/rubocop/numbered/params/plugin.rb', line 10 def about LintRoller::About.new( name: "rubocop-numbered-params", version: VERSION, homepage: "https://github.com/tk0miya/rubocop-numbered-params", description: "A RuboCop plugin that recommends using numbered parameters (_1, _2) " \ "instead of named block arguments in short blocks." ) end |
#rules(_context) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/rubocop/numbered/params/plugin.rb', line 26 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: Pathname.new(__dir__ || "").join("../../../../config/default.yml") ) end |
#supported?(context) ⇒ Boolean
21 22 23 |
# File 'lib/rubocop/numbered/params/plugin.rb', line 21 def supported?(context) context.engine == :rubocop end |