Sha256: f2b78b02c4a1011dcf9913e0bd49d4c8b4ca13841f1997fd25cd83340d0f4588
Contents?: true
Size: 1.79 KB
Versions: 115
Compression:
Stored size: 1.79 KB
Contents
package com.xruby.GeneratedMethods; import com.xruby.runtime.lang.*; import com.xruby.runtime.builtin.RubyArray; import com.xruby.runtime.stdlib.RubyStringIO; public class RubyStringIO_Methods{ public static void initMethods( RubyClass klass){ klass.defineMethod( "puts", new RubyOneArgMethod(){ protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){ return ((RubyStringIO)receiver).puts(arg);} }); klass.defineMethod( "write", new RubyOneArgMethod(){ protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){ return ((RubyStringIO)receiver).write(arg);} }); klass.aliasMethod("syswrite","write"); klass.defineMethod( "read", new RubyVarArgMethod(){ protected RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block ){ return ((RubyStringIO)receiver).read(args);} }); klass.defineMethod( "readline", new RubyVarArgMethod(){ protected RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block ){ return ((RubyStringIO)receiver).readLine(args);} }); klass.defineMethod( "eof?", new RubyNoArgMethod(){ protected RubyValue run(RubyValue receiver, RubyBlock block ){ return ((RubyStringIO)receiver).isEOF();} }); klass.defineMethod( "string", new RubyNoArgMethod(){ protected RubyValue run(RubyValue receiver, RubyBlock block ){ return ((RubyStringIO)receiver).string();} }); klass.defineMethod( "initialize", new RubyNoOrOneArgMethod(){ protected RubyValue run(RubyValue receiver, RubyBlock block ){ return ((RubyStringIO)receiver).initialize();} protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block ){ return ((RubyStringIO)receiver).initialize(arg);} }); klass.defineAllocMethod(new RubyNoArgMethod(){ protected RubyValue run(RubyValue receiver, RubyBlock block ) { return RubyStringIO.alloc(receiver); }} ); }}
Version data entries
115 entries across 115 versions & 1 rubygems