Ejemplo n.º 1
0
  // @RubyLevelMethod(name="end_with?")
  public RubyValue opEndWith(RubyValue v) {
    if (this == v) {
      return RubyConstant.QTRUE;
    }

    if (v instanceof RubyString) {
      RubyString str = ((RubyString) v);

      return this.sb_.toString().endsWith(str.toStr()) ? RubyConstant.QTRUE : RubyConstant.QFALSE;
    }

    return RubyConstant.QFALSE;
  }