Sha256: ba9481ad514dd20bc7e848a6a0c471efcef2c56ccabe2ba545b4a676a500549c
Contents?: true
Size: 626 Bytes
Versions: 1
Compression:
Stored size: 626 Bytes
Contents
# Copyright (C) 2007-2008 Annas Al Maleh # Licensed under the LGPL. See /COPYING.LGPL for more details. require File.dirname(__FILE__) + "/../command_handler" require File.dirname(__FILE__) + "/models/node" class XmlTextCommandHandler include CommandHandler def can_handle?(parent, command_symbol, *args, &block) (parent == nil or parent.is_a?(Node)) and (command_symbol.to_s == "text") and ((args.size == 1) and (args[0].is_a?(String))) and !block end def do_handle(parent, command_symbol, *args, &block) parent.children << args[0] if parent args[0] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glimmer-0.1.0.0 | src/xml_command_handlers/xml_text_command_handler.rb |