Mercurial Hosting > luan
diff core/src/luan/modules/HtmlLuan.java @ 302:2f8938fc518c
fix modules Binary and Html
git-svn-id: https://luan-java.googlecode.com/svn/trunk@303 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 18 Dec 2014 04:56:30 +0000 |
parents | ec016471c6eb |
children | 4fe6c9fed486 |
line wrap: on
line diff
--- a/core/src/luan/modules/HtmlLuan.java Wed Dec 17 12:35:57 2014 +0000 +++ b/core/src/luan/modules/HtmlLuan.java Thu Dec 18 04:56:30 2014 +0000 @@ -4,28 +4,11 @@ import luan.LuanState; import luan.LuanTable; import luan.LuanFunction; -import luan.LuanJavaFunction; import luan.LuanException; public final class HtmlLuan { - public static final LuanFunction LOADER = new LuanFunction() { - @Override public Object call(LuanState luan,Object[] args) { - LuanTable module = Luan.newTable(); - try { - add( module, "encode", String.class ); - } catch(NoSuchMethodException e) { - throw new RuntimeException(e); - } - return module; - } - }; - - private static void add(LuanTable t,String method,Class<?>... parameterTypes) throws NoSuchMethodException { - t.put( method, new LuanJavaFunction(HtmlLuan.class.getMethod(method,parameterTypes),null) ); - } - public static String encode(String s) { char[] a = s.toCharArray(); StringBuilder buf = new StringBuilder();