Sha256: ec56a4c6840134a91acdea0e40633f856f1cc87c11ca2fe7dcc120d8349c1f8d
Contents?: true
Size: 1.23 KB
Versions: 254
Compression:
Stored size: 1.23 KB
Contents
/** * Copyright 2007 Ye Zheng * Distributed under the BSD License */ package com.xruby.runtime.lang; import com.xruby.runtime.builtin.RubyArray; public abstract class RubyTwoArgBlock extends RubyBlock { public RubyTwoArgBlock(RubyValue self, RubyValue arg, RubyArray args, RubyBlock block, RubyModule scope, RubyMethod owner, boolean definedInAnotherBlock) { super(2, false, 0, self, arg, args, block, scope, owner, definedInAnotherBlock); } protected RubyValue run(RubyValue receiver, RubyArray args) { RubyValue arg0 = RubyConstant.QNIL; RubyValue arg1 = RubyConstant.QNIL; if (args != null) { int size = args.size(); if (size >= 1) { arg0 = args.get(0); } if (size >= 2) { arg1 = args.get(1); } } return this.run(receiver, arg0, arg1); } protected RubyValue run(RubyValue receiver, RubyValue arg) { return this.run(receiver, arg, RubyConstant.QNIL); } protected RubyValue run(RubyValue receiver) { return this.run(receiver, RubyConstant.QNIL, RubyConstant.QNIL); } protected abstract RubyValue run(RubyValue receiver, RubyValue arg0, RubyValue arg1); }
Version data entries
254 entries across 136 versions & 2 rubygems