Class: Kwartz::Converter

Inherits:
Object
  • Object
show all
Includes:
ConvertErrorHelper
Defined in:
lib/kwartz/converter.rb

Overview

(abstract) covnert presentation data into list of Statement.

Direct Known Subclasses

TextConverter

Constant Summary collapse

@@class_table =
{}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ConvertErrorHelper

#convert_error

Constructor Details

#initialize(handler, properties = {}) ⇒ Converter

Returns a new instance of Converter.



947
948
949
# File 'lib/kwartz/converter.rb', line 947

def initialize(handler, properties={})
  @handler = handler
end

Instance Attribute Details

#handlerObject (readonly)

, :dattr, :input



951
952
953
# File 'lib/kwartz/converter.rb', line 951

def handler
  @handler
end

Class Method Details

.get_class(style) ⇒ Object



968
969
970
# File 'lib/kwartz/converter.rb', line 968

def self.get_class(style)
  return @@class_table[style]
end

.register_class(style, klass) ⇒ Object



963
964
965
# File 'lib/kwartz/converter.rb', line 963

def self.register_class(style, klass)
  @@class_table[style] = klass
end

Instance Method Details

#convert(input, filename = '') ⇒ Object

(abstract) convert string into list of Statement.



955
956
957
# File 'lib/kwartz/converter.rb', line 955

def convert(input, filename='')
  not_implemented
end