mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-13 09:40:32 +08:00
add basic ScratchPad object
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user