Class: RuboCop::OrderedMethods::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::OrderedMethods::Plugin
- Defined in:
- lib/rubocop/ordered_methods/plugin.rb
Overview
Official plugin system for Rubocop
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rubocop/ordered_methods/plugin.rb', line 9 def about LintRoller::About.new( name: 'rubocop-ordered_methods', version: RuboCop::OrderedMethods::VERSION, homepage: 'https://github.com/shanecav84/rubocop-ordered_methods', description: 'Check that methods are defined alphabetically per access modifier block.' ) end |
#rules(_context) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rubocop/ordered_methods/plugin.rb', line 18 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: Pathname.new(__dir__).join('../../../config/default.yml') ) end |
#supported?(context) ⇒ Boolean
26 27 28 |
# File 'lib/rubocop/ordered_methods/plugin.rb', line 26 def supported?(context) context.engine == :rubocop end |