Package org.cx4a.rsense.ruby

Examples of org.cx4a.rsense.ruby.MetaClass


        context.popFrame();
    }

    public static ClassTag getClassTag(RubyModule klass) {
        if (klass instanceof MetaClass) {
            MetaClass metaClass = (MetaClass) klass;
            if (metaClass.getAttached() instanceof RubyModule) {
                klass = (RubyModule) metaClass.getAttached();
            }
        }
        if (klass != null && klass.getTag() instanceof ClassTag) {
            return (ClassTag) klass.getTag();
        } else {
View Full Code Here


        if (receiverVertex != null) {
            for (IRubyObject object : receiverVertex.getTypeSet()) {
                RubyClass klass = object.getMetaClass();
                if (klass.isSingleton()) {
                    MetaClass metaClass = (MetaClass) klass;
                    if (metaClass.getAttached() instanceof RubyModule) {
                        context.pushFrame(klass, "sclass", klass, null, Visibility.PUBLIC);
                        context.pushScope(new LocalScope((RubyModule) metaClass.getAttached()));

                        if (node.getBodyNode() != null) {
                            createVertex(node.getBodyNode());
                        }
View Full Code Here

                                locations.add(method.getLocation());
                        } else {
                            // Try to find constant
                            RubyModule klass = null;
                            if (receiverType instanceof MetaClass) {
                                MetaClass metaClass = (MetaClass) receiverType;
                                if (metaClass.getAttached() instanceof RubyModule)
                                    klass = (RubyModule) metaClass.getAttached();
                            } else
                                klass = context.project.getGraph().getRuntime().getContext().getCurrentScope().getModule();
                            if (klass != null) {
                                IRubyObject constant = klass.getConstant(realName);
                                if (constant instanceof VertexHolder)
View Full Code Here

TOP

Related Classes of org.cx4a.rsense.ruby.MetaClass

Copyright © 2018 www.massapicom. 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.