class GrammarPlugin
@abstract Subclass GrammarLinter
or GrammarTransform
to implement a plugin
Public Class Methods
display_options(indent, options)
click to toggle source
display the options as they would appear in the source @abstract override this to display the options as they would be entered into
source code
@param indent [String] the spaces to indent each line width @param options [Hash] all options passed to the pattern @return [String] the options as a string @note each option should be prepended with +“\n,#{indent}”+ @note only display the options that are unique to this plugin
# File lib/ruby_grammar_builder/grammar_plugin.rb, line 21 def self.display_options(indent, options) # rubocop:disable Lint/UnusedMethodArgument raise "Internal error: display_options called with no provided options" if options.empty? if self.options.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()
click to toggle source
The options this plugin supports @return [Array<Symbol>] a list of symbols that represent keys that can
be read by the plugin
@note the keys :grammar and :repository are reserved for passing grammar information
# File lib/ruby_grammar_builder/grammar_plugin.rb, line 9 def self.options [] end