protected object InternalInvoke(string method, object[] args)
{
if (method == "set")
{
PrototypeHelper.JSGenerator.RemoveTail(parentGenerator);
PrototypeHelper.JSGenerator.Record(parentGenerator, " = " + args[0]);
return null;
}
else
{
PrototypeHelper.JSGenerator.ReplaceTailByPeriod(parentGenerator);
//TODO: This code is duplicated JSCollectionGeneratorBase line 65
DynamicDispatchSupport dispInterface = generator as DynamicDispatchSupport;
if (dispInterface == null)
{
throw new MonoRail.Framework.RailsException("JS Generators must inherit DynamicDispatchSupport");
}
if (dispInterface.IsGeneratorMethod(method))
{
dispInterface.Dispatch(method, args);
}
else
{
parentGenerator.Call(method, args);
}
return this;
}
}
}