Class: LintRoller::Plugin
- Inherits:
-
Object
- Object
- LintRoller::Plugin
- Defined in:
- lib/lint_roller/plugin.rb
Instance Method Summary collapse
- #about ⇒ Object
-
#initialize(config = {}) ⇒ Plugin
constructor
‘config’ is a Hash of options passed to the plugin by the user.
-
#rules(context) ⇒ Object
‘context’ is an instance of LintRoller::Context provided by the runner.
-
#supported?(context) ⇒ Boolean
‘context’ is an instance of LintRoller::Context provided by the runner.
Constructor Details
#initialize(config = {}) ⇒ Plugin
‘config’ is a Hash of options passed to the plugin by the user
4 5 6 |
# File 'lib/lint_roller/plugin.rb', line 4 def initialize(config = {}) @config = config end |
Instance Method Details
#about ⇒ Object
8 9 10 |
# File 'lib/lint_roller/plugin.rb', line 8 def about raise Error.new("Please implement `about` and return an instance of LintRoller::About") end |
#rules(context) ⇒ Object
‘context’ is an instance of LintRoller::Context provided by the runner
18 19 20 |
# File 'lib/lint_roller/plugin.rb', line 18 def rules(context) raise Error.new("Please implement `rules(context)` and return an instance of LintRoller::Rules") end |
#supported?(context) ⇒ Boolean
‘context’ is an instance of LintRoller::Context provided by the runner
13 14 15 |
# File 'lib/lint_roller/plugin.rb', line 13 def supported?(context) true end |