Sha256: 4a12c0f4c953dcd18344938b9b785d4b1e8e6df66e3ed4ac9542e7c9e7a34054

Contents?: true

Size: 594 Bytes

Versions: 254

Compression:

Stored size: 594 Bytes

Contents

package com.xruby.runtime.lang;

import com.xruby.runtime.builtin.RubyArray;

public abstract class RubyNoOrOneArgMethod extends RubyMethod {
	public RubyNoOrOneArgMethod() {
		super(-1, false, 0);
	}
	
	protected abstract RubyValue run(RubyValue receiver, RubyBlock block);
	
	protected abstract RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block);
	
	protected RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block) {
		if (args == null || args.size() == 0) {
			return this.run(receiver, block);
		} else {
			return this.run(receiver, args.get(0), block);
		}
	}
}

Version data entries

254 entries across 136 versions & 2 rubygems

Version Path
rhodes-3.3.0.beta.1 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.3 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.3 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.2 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.2 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.2.beta platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.2.beta platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.1 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.1 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.9 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.9 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.8 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.8 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.7 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.7 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.6 platform/shared/xruby/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.6 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java
rhodes-3.2.0.beta.5 platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyNoOrOneArgMethod.java