Module Erubis::Converter
In: erubis/converter.rb

convert

Methods

Attributes

escape  [RW] 
postamble  [RW] 
preamble  [RW] 

Public Instance methods

convert input string into target language

[Source]

# File erubis/converter.rb, line 34
    def convert(input)
      codebuf = ""    # or []
      @preamble.nil? ? add_preamble(codebuf) : (@preamble && (codebuf << @preamble))
      convert_input(codebuf, input)
      @postamble.nil? ? add_postamble(codebuf) : (@postamble && (codebuf << @postamble))
      return codebuf  # or codebuf.join()
    end

[Source]

# File erubis/converter.rb, line 27
    def init_converter(properties={})
      @preamble  = properties[:preamble]
      @postamble = properties[:postamble]
      @escape    = properties[:escape]
    end

Protected Instance methods

(abstract) convert input to code

[Source]

# File erubis/converter.rb, line 47
    def convert_input(codebuf, input)
      not_implemented
    end

[Validate]