public static RubyClass createConverterClass(Ruby runtime) { RubyClass converterc = runtime.defineClassUnder( "Converter", runtime.getClass("Data"), CONVERTER_ALLOCATOR, runtime.getEncoding()); runtime.setConverter(converterc); converterc.index = ClassIndex.CONVERTER; converterc.setReifiedClass(RubyConverter.class); converterc.kindOf = new RubyModule.JavaClassKindOf(RubyConverter.class); converterc.defineAnnotatedMethods(RubyConverter.class); return converterc; }
private RubyEncoding(Ruby runtime, Encoding encoding) { super(runtime, runtime.getEncoding()); this.name = new ByteList(encoding.getName()); this.isDummy = false; this.encoding = encoding; }
private RubyEncoding(Ruby runtime, byte[] name, int p, int end, boolean isDummy) { super(runtime, runtime.getEncoding()); this.name = new ByteList(name, p, end); this.isDummy = isDummy; }