Class: Standard::Base::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- Standard::Base::Plugin
- Defined in:
- lib/standard/base/plugin.rb
Instance Method Summary collapse
- #about ⇒ Object
-
#initialize(config) ⇒ Plugin
constructor
A new instance of Plugin.
- #rules(context) ⇒ Object
- #supported?(context) ⇒ Boolean
Constructor Details
#initialize(config) ⇒ Plugin
Returns a new instance of Plugin.
3 4 5 |
# File 'lib/standard/base/plugin.rb', line 3 def initialize(config) @config = config end |
Instance Method Details
#about ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/standard/base/plugin.rb', line 7 def about LintRoller::About.new( name: "standard-base", version: VERSION, homepage: "https://github.com/standardrb/standard", description: "Configuration for RuboCop's built-in rules" ) end |
#rules(context) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/standard/base/plugin.rb', line 20 def rules(context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: determine_yaml_path(context.target_ruby_version) ) end |
#supported?(context) ⇒ Boolean
16 17 18 |
# File 'lib/standard/base/plugin.rb', line 16 def supported?(context) true end |