Class: Cogger::Formatters::Parsers::Abstract
- Inherits:
-
Object
- Object
- Cogger::Formatters::Parsers::Abstract
- Defined in:
- lib/cogger/formatters/parsers/abstract.rb
Overview
An abstract class with common functionality.
Constant Summary collapse
- TRANSFORMERS =
{color: Transformers::Color.new, emoji: Transformers::Emoji.new}.freeze
Instance Method Summary collapse
- #call(_template) ⇒ Object
-
#initialize(registry: Cogger, transformers: TRANSFORMERS, expressor: Regexp) ⇒ Abstract
constructor
A new instance of Abstract.
Constructor Details
#initialize(registry: Cogger, transformers: TRANSFORMERS, expressor: Regexp) ⇒ Abstract
Returns a new instance of Abstract.
10 11 12 13 14 |
# File 'lib/cogger/formatters/parsers/abstract.rb', line 10 def initialize registry: Cogger, transformers: TRANSFORMERS, expressor: Regexp @registry = registry @transformers = transformers @expressor = expressor end |
Instance Method Details
#call(_template) ⇒ Object
16 17 18 19 |
# File 'lib/cogger/formatters/parsers/abstract.rb', line 16 def call(_template, **) fail NoMethodError, "`#{self.class}##{__method__} #{method(__method__).parameters}` must be implemented." end |