Sha256: 67645070a979ee614b80d158eaf4bc59303ede94d4ee0d9c352e012bd512f483
Contents?: true
Size: 750 Bytes
Versions: 135
Compression:
Stored size: 750 Bytes
Contents
/** * Copyright 2005-2007 Xue Yong Zhi * Distributed under the BSD License */ package com.xruby.runtime.builtin; import com.xruby.runtime.lang.RubyBlock; import com.xruby.runtime.lang.RubyID; import com.xruby.runtime.lang.RubyOneArgMethod; import com.xruby.runtime.lang.RubyValue; public class AttrWriter extends RubyOneArgMethod { private RubyID attrName; public AttrWriter(String methodName) { attrName = RubyID.intern("@" + methodName); } public AttrWriter(RubyID id) { attrName = RubyID.intern("@" + id.toString()); } protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block) { return receiver.setInstanceVariable(arg, attrName); } }
Version data entries
135 entries across 135 versions & 2 rubygems