Package org.jruby

Examples of org.jruby.RubyModule.callMethod()


        final RubyModule jdbc = runtime.getModule("Jdbc");
        if ( jdbc != null ) { // Jdbc::MySQL
            final RubyModule constant = (RubyModule) jdbc.getConstantAt(constName);
            if ( constant != null ) { // ::Jdbc::MySQL.load_driver :
                if ( constant.respondsTo("load_driver") ) {
                    IRubyObject result = constant.callMethod("load_driver");
                    synchronized (loadedMap) {
                        loadedMap.put(constName, Boolean.TRUE);
                    }
                    return result;
                }
View Full Code Here


                                runtime.newBoolean( ! nonUnique ), // unique
                                runtime.newArray(), // [] for column names, we'll add to that in just a bit
                                runtime.newArray() // lengths
                            };

                            indexes.append( indexDefinition.callMethod(context, "new", args) ); // IndexDefinition.new
                        }

                        IRubyObject lastIndexDef = indexes.isEmpty() ? null : indexes.entry(-1);
                        if ( lastIndexDef != null ) {
                            final String columnName = caseConvertIdentifierForRails(connection, keySet.getString("column_name"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.