comparison core/src/luan/modules/HtmlLuan.java @ 221:ec016471c6eb

make LuanTable an interface git-svn-id: https://luan-java.googlecode.com/svn/trunk@222 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 17 Jul 2014 07:49:26 +0000
parents 3dcb0f9bee82
children 2f8938fc518c
comparison
equal deleted inserted replaced
220:61afe2a1ce96 221:ec016471c6eb
1 package luan.modules; 1 package luan.modules;
2 2
3 import luan.Luan;
3 import luan.LuanState; 4 import luan.LuanState;
4 import luan.LuanTable; 5 import luan.LuanTable;
5 import luan.LuanFunction; 6 import luan.LuanFunction;
6 import luan.LuanJavaFunction; 7 import luan.LuanJavaFunction;
7 import luan.LuanException; 8 import luan.LuanException;
9 10
10 public final class HtmlLuan { 11 public final class HtmlLuan {
11 12
12 public static final LuanFunction LOADER = new LuanFunction() { 13 public static final LuanFunction LOADER = new LuanFunction() {
13 @Override public Object call(LuanState luan,Object[] args) { 14 @Override public Object call(LuanState luan,Object[] args) {
14 LuanTable module = new LuanTable(); 15 LuanTable module = Luan.newTable();
15 try { 16 try {
16 add( module, "encode", String.class ); 17 add( module, "encode", String.class );
17 } catch(NoSuchMethodException e) { 18 } catch(NoSuchMethodException e) {
18 throw new RuntimeException(e); 19 throw new RuntimeException(e);
19 } 20 }