Kwartz (Module)

In: kwartz.rb

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Methods

assert   compile   compile!  

Constants

AUTHOR = 'kwa '
VERSION = ('$Revision: 0.103 $' =~ /\d+(?:\.\d+)+/ && $&)
LAST_UPDATE = ('$Date: 2004/05/09 07:46:40 $' =~ /\d+[-\/]\d+[-\/]\d+/ && $&)

Classes and Modules

Module Kwartz::Action
Module Kwartz::Conditional
Class Kwartz::AbstractMethodInvokationError
Class Kwartz::AnalysisError
Class Kwartz::Analyzer
Class Kwartz::AssertionError
Class Kwartz::CompileError
Class Kwartz::Compiler
Class Kwartz::Converter
Class Kwartz::ConvertionError
Class Kwartz::DefaultConverter
  ::Class Kwartz::DefaultConverter::FetchValue
Class Kwartz::ErbTranslator
Class Kwartz::ErbscanTranslator
Class Kwartz::ErubyTranslator
Class Kwartz::ExpandStmtNode
Class Kwartz::ExprNode
Class Kwartz::ForeachStmtNode
Class Kwartz::IfStmtNode
Class Kwartz::IllegalDirectiveError
Class Kwartz::InvalidLanguageError
Class Kwartz::JspTranslator
Class Kwartz::KwartzError
Class Kwartz::MacroStmtNode
Class Kwartz::Node
Class Kwartz::NodeConverter
Class Kwartz::NodeList
Class Kwartz::NodePrinter
Class Kwartz::ParseError
Class Kwartz::Parser
  ::Class Kwartz::Parser::Scanner
  ::  ::Module Kwartz::Parser::Scanner::Helper
  ::  ::Module Kwartz::Parser::Scanner::Util
  ::  ::  ::Class Kwartz::Parser::Scanner::Util::CommandOptionError
Class Kwartz::Php2Translator
Class Kwartz::PhpTranslator
Class Kwartz::Print2StmtNode
Class Kwartz::PrintStmtNode
Class Kwartz::RawcodeStmtNode
Class Kwartz::Ruby2Translator
Class Kwartz::RubyTranslator
Class Kwartz::ScanError
Class Kwartz::SemanticError
Class Kwartz::SetStmtNode
Class Kwartz::StmtNode
Class Kwartz::SyntaxError
Class Kwartz::TranslationError
Class Kwartz::Translator
Class Kwartz::UnclosedTagError
Class Kwartz::VelocityTranslator
Class Kwartz::WhileStmtNode

Public Class methods

ex.

 Kwartz::assert() unless arg == nil

read input-file and plogic-file, compile it, and write output into output-file.

if output-file is newer than input-file and plogic-file, compile is not done, and return nil. Else compile and write into output-file, and return output string.

arguments:

  • in_filename — mandatory. filename of input.
  • out_filename — mandatory. filename of output.
  • plogic_filename — optional(defalt is nil). filename of presentation logic file. use nil when plogic-file is not required.
  • lang — optional(default is "ruby")

ex. for eRuby:

 require 'kwartz'
 Kwartz::compile('file.html', 'file.eruby', 'file.plogic', 'eruby')
 ERuby::import('file.eruby')

compile input-file and plogic-file, and write output into out-file. always compile even if out-file is newer than input-file or plogic-file.

[Validate]