Class: Cogger::Formatters::Parsers::Abstract

Inherits:
Object
  • Object
show all
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

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