Examples of RubyModule


Examples of org.jruby.RubyModule

    public static IRubyObject def(ThreadContext context, IRubyObject self, Object scriptObject, String name, String javaName, String[] scopeNames,
            int arity, int required, int optional, int rest, CallConfiguration callConfig) {
        Class compiledClass = scriptObject.getClass();
        Ruby runtime = context.getRuntime();
       
        RubyModule containingClass = context.getRubyClass();
        Visibility visibility = context.getCurrentVisibility();
       
        performNormalMethodChecks(containingClass, runtime, name);
       
        StaticScope scope = creatScopeForClass(context, scopeNames, required, optional, rest);
View Full Code Here

Examples of org.jruby.RubyModule

     * method to call from the frame, and then invoke that on the
     * super class with the current self as the actual object
     * invoking.
     */
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, args, CallType.SUPER, block);
        }
        return invokeAs(context, superClass, self, context.getFrameName(), args, block);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        }
        return invokeAs(context, superClass, self, context.getFrameName(), args, block);
    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, CallType.SUPER, block);
        }
        return invokeAs(context, superClass, self, context.getFrameName(), block);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        }
        return invokeAs(context, superClass, self, context.getFrameName(), block);
    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, arg0, CallType.SUPER, block);
        }
        return invokeAs(context, superClass, self, context.getFrameName(), arg0, block);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        }
        return invokeAs(context, superClass, self, context.getFrameName(), arg0, block);
    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, arg0, arg1, CallType.SUPER, block);
        }
        return invokeAs(context, superClass, self, context.getFrameName(), arg0, arg1, block);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        }
        return invokeAs(context, superClass, self, context.getFrameName(), arg0, arg1, block);
    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, arg0, arg1, arg2, CallType.SUPER, block);
        }
        return invokeAs(context, superClass, self, context.getFrameName(), arg0, arg1, arg2, block);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        return (RubyArray) value;
    }
   
    public static IRubyObject fetchClassVariable(ThreadContext context, Ruby runtime,
            IRubyObject self, String name) {
        RubyModule rubyClass = ASTInterpreter.getClassVariableBase(context, runtime);
  
        if (rubyClass == null) rubyClass = self.getMetaClass();

        return rubyClass.getClassVar(name);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        return rubyClass.getClassVar(name);
    }
   
    public static IRubyObject fastFetchClassVariable(ThreadContext context, Ruby runtime,
            IRubyObject self, String internedName) {
        RubyModule rubyClass = ASTInterpreter.getClassVariableBase(context, runtime);
  
        if (rubyClass == null) rubyClass = self.getMetaClass();

        return rubyClass.fastGetClassVar(internedName);
    }
View Full Code Here

Examples of org.jruby.RubyModule

        }
    }
   
    public static IRubyObject setClassVariable(ThreadContext context, Ruby runtime,
            IRubyObject self, String name, IRubyObject value) {
        RubyModule rubyClass = ASTInterpreter.getClassVariableBase(context, runtime);
  
        if (rubyClass == null) rubyClass = self.getMetaClass();

        rubyClass.setClassVar(name, value);
  
        return value;
    }
View Full Code Here

Examples of org.jruby.RubyModule

        return value;
    }
   
    public static IRubyObject fastSetClassVariable(ThreadContext context, Ruby runtime,
            IRubyObject self, String internedName, IRubyObject value) {
        RubyModule rubyClass = ASTInterpreter.getClassVariableBase(context, runtime);
  
        if (rubyClass == null) rubyClass = self.getMetaClass();

        rubyClass.fastSetClassVar(internedName, value);
  
        return value;
    }
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.