Class: Syntax::Convertors::Abstract

### Home Classes Methods

### In Files

- lib/syntax/convertors/abstract.rb

### Parent

Object

### Methods

- ::for_syntax
- ::new

### Class/Module Index

Quicksearch

- Syntax
- Syntax::AnsiC
- Syntax::CSS21
- Syntax::Convertors
- Syntax::Convertors::Abstract
- Syntax::Convertors::HTML
- Syntax::Default
- Syntax::Fortran
- Syntax::Javascript
- Syntax::Ruby
- Syntax::SQLite
- Syntax::Token
- Syntax::Tokenizer
- Syntax::Version
- Syntax::XML
- Syntax::YAML

No matching classes.

# Syntax::Convertors::Abstract

The abstract ancestor class for all convertors. It implements a few convenience methods to provide a common interface for all convertors.

### Attributes

tokenizer[R]

A reference to the tokenizer used by this convertor.

### Public Class Methods

for_syntax( syntax ) click to toggle source

A convenience method for instantiating a new convertor for a specific syntax.

    # File lib/syntax/convertors/abstract.rb, line 15
    def self.for_syntax( syntax )
      new( Syntax.load( syntax ) )
    end

new( tokenizer ) click to toggle source

Creates a new convertor that uses the given tokenizer.

    # File lib/syntax/convertors/abstract.rb, line 20
    def initialize( tokenizer )
      @tokenizer = tokenizer
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.