Class: RunnableWrapper

Inherits:
Object show all
Defined in:
lib/droiuby/wrappers/runnable_wrapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ RunnableWrapper

Returns a new instance of RunnableWrapper.



3
4
5
6
# File 'lib/droiuby/wrappers/runnable_wrapper.rb', line 3

def initialize(block)
  @block = block
  @native = Java::com.droiuby.wrappers.RunnableRubyWrapper.new(_execution_bundle,self)
end

Instance Method Details

#runObject



8
9
10
# File 'lib/droiuby/wrappers/runnable_wrapper.rb', line 8

def run
  @block.call
end

#to_nativeObject



12
13
14
# File 'lib/droiuby/wrappers/runnable_wrapper.rb', line 12

def to_native
  @native
end