add basic ScratchPad object

This commit is contained in:
Laurent Sansonetti
2014-04-14 23:33:17 +02:00
parent b7a7a7abbc
commit 4bda360c99

View File

@@ -24,6 +24,15 @@ class ShouldResult < Java::Lang::Object
end
end
class ScratchPadClass < Java::Lang::Object
def record(obj); @obj = obj; end
def <<(x); @obj << x; end
def recorded; @obj; end
def clear; @obj = nil; end
end
ScratchPad = ScratchPadClass.new
class Object
def describe(msg, &block)
if $running