Пример #1
0
 // @RubyLevelMethod(name="pack")
 public RubyValue pack(RubyValue arg) {
   String format = ((RubyString) arg).toString();
   return ObjectFactory.createString(ArrayPacker.pack(this, format));
 }
Пример #2
0
 // @RubyLevelMethod(name="unpack")
 public RubyValue unpack(RubyValue arg) {
   RubyString format = ((RubyString) arg);
   return ArrayPacker.unpack(toString(), format.toString());
 }