Class: Syntax::Convertors::Abstract
- Inherits:
-
Object
- Object
- Syntax::Convertors::Abstract
- Defined in:
- lib/syntax/convertors/abstract.rb
Overview
The abstract ancestor class for all convertors. It implements a few convenience methods to provide a common interface for all convertors.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#tokenizer ⇒ Object
readonly
A reference to the tokenizer used by this convertor.
Class Method Summary collapse
-
.for_syntax(syntax) ⇒ Object
A convenience method for instantiating a new convertor for a specific syntax.
Instance Method Summary collapse
-
#initialize(tokenizer) ⇒ Abstract
constructor
Creates a new convertor that uses the given tokenizer.
Constructor Details
#initialize(tokenizer) ⇒ Abstract
Creates a new convertor that uses the given tokenizer.
20 21 22 |
# File 'lib/syntax/convertors/abstract.rb', line 20 def initialize( tokenizer ) @tokenizer = tokenizer end |
Instance Attribute Details
#tokenizer ⇒ Object (readonly)
A reference to the tokenizer used by this convertor.
11 12 13 |
# File 'lib/syntax/convertors/abstract.rb', line 11 def tokenizer @tokenizer end |