Class: GrammarPlugin Abstract
- Inherits:
-
Object
- Object
- GrammarPlugin
- Defined in:
- lib/ruby_grammar_builder/grammar_plugin.rb
Overview
This class is abstract.
Subclass GrammarLinter or GrammarTransform to implement a plugin
Direct Known Subclasses
Class Method Summary collapse
-
.display_options(indent, options) ⇒ String
abstract
display the options as they would appear in the source.
-
.options ⇒ Array<Symbol>
The options this plugin supports.
Class Method Details
.display_options(indent, options) ⇒ String
This method is abstract.
override this to display the options as they would be entered into source code
Note:
each option should be prepended with “\n,#{indent}”
Note:
only display the options that are unique to this plugin
display the options as they would appear in the source
21 22 23 24 25 26 27 28 29 |
# File 'lib/ruby_grammar_builder/grammar_plugin.rb', line 21 def self.(indent, ) # rubocop:disable Lint/UnusedMethodArgument raise "Internal error: display_options called with no provided options" if .empty? if self..empty? raise "Internal error: display_options called on a plugin that provides no options" end raise "GrammarPlugin::options implemented but GrammarPlugin::display_options has not been" end |
.options ⇒ Array<Symbol>
Note:
the keys :grammar and :repository are reserved for passing grammar information
The options this plugin supports
9 10 11 |
# File 'lib/ruby_grammar_builder/grammar_plugin.rb', line 9 def self. [] end |