changeset 375:e2e70d27c258

simplify mail
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 17 Apr 2015 18:34:02 -0600
parents 538c19ad1272
children 0a75ed73bccc
files mail/src/luan/modules/mail/Mail.luan mail/src/luan/modules/mail/SmtpCon.java
diffstat 2 files changed, 2 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/mail/src/luan/modules/mail/Mail.luan	Fri Apr 17 18:03:26 2015 -0600
+++ b/mail/src/luan/modules/mail/Mail.luan	Fri Apr 17 18:34:02 2015 -0600
@@ -10,5 +10,6 @@
 
 function Sender(params)
 	assert_table(params)
-	return SmtpCon.new(params).table()
+	local smtpCon = SmtpCon.new(params)
+	return { send = smtpCon.send }
 end
--- a/mail/src/luan/modules/mail/SmtpCon.java	Fri Apr 17 18:03:26 2015 -0600
+++ b/mail/src/luan/modules/mail/SmtpCon.java	Fri Apr 17 18:34:02 2015 -0600
@@ -78,18 +78,6 @@
 		return (String)val;
 	}
 
-	public LuanTable table() {
-		LuanTable tbl = Luan.newTable();
-		try {
-			tbl.put( "send", new LuanJavaFunction(
-				SmtpCon.class.getMethod( "send", LuanState.class, LuanTable.class ), this
-			) );
-		} catch(NoSuchMethodException e) {
-			throw new RuntimeException(e);
-		}
-		return tbl;
-	}
-
 
 	public void send(LuanState luan,LuanTable mailTbl) throws LuanException {
 		try {