Sha256: 50925e1053be5d698cc68cac7558a6b41a468e228c4e7ec6450888e8b4f63940
Contents?: true
Size: 566 Bytes
Versions: 21
Compression:
Stored size: 566 Bytes
Contents
require File.dirname(__FILE__) + "/../command_handler" require File.dirname(__FILE__) + "/models/node" class XmlCommandHandler include CommandHandler def can_handle?(parent, command_symbol, *args, &block) (parent == nil or parent.is_a?(Node)) and (args.size == 0 or ((args.size == 1) and ((args[0].is_a?(Hash)) or (args[0].is_a?(Hash))))) end def do_handle(parent, command_symbol, *args, &block) attributes = Hash.new attributes = args[0] if (args.size == 1) Node.new(parent, command_symbol.to_s, attributes, &block) end end
Version data entries
21 entries across 21 versions & 1 rubygems