Sha256: df075fbd36ed8a363fce8b0d6ec979e4ed81e11b9e8be1b89530276caacd8d0f

Contents?: true

Size: 1.46 KB

Versions: 9

Compression:

Stored size: 1.46 KB

Contents

#!/usr/bin/env ruby -w
# encoding: UTF-8
#
# = RichTextFunctionHandler.rb -- The TaskJuggler III Project Management Software
#
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
#               by Chris Schlaeger <chris@linux.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#

class TaskJuggler

  # This class is the abstract base class for all RichText function handlers.
  # A function handler is responsible for a certain function such as 'example'
  # or 'query'. functions are used in internal RichText references such as
  # '[[example:Allocation 2]]'. 'example' is the function, 'Allocation' is the
  # path and '2' is the first argument. Arguments are optional. The function
  # handler can turn such internal references into Strings or XMLElement
  # trees. Therefor, each derived handler needs to implement a to_s, to_html
  # and to_tagged method that takes two parameter. The first is the path, the
  # second is the argument Array.
  class RichTextFunctionHandler

    attr_reader :function, :blockFunction

    def initialize(messageHandler, function, sourceFileInfo = nil)
      @messageHandler = messageHandler
      @function = function
      @blockFunction = false
      @sourceFileInfo = sourceFileInfo
    end

    def error(id, text)
      @messageHandler.error(id, text, @sourceFileInfo) if @messageHandler
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
taskjuggler-3.0.0 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.2.2 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.2.1 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.2.0 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.1.1 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.1.0 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.0.11 lib/taskjuggler/RichText/FunctionHandler.rb
taskjuggler-0.0.10 lib/RichTextFunctionHandler.rb
taskjuggler-0.0.9 lib/RichTextFunctionHandler.rb