Class: AsyncWrapper

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

Instance Method Summary collapse

Constructor Details

#initializeAsyncWrapper

Returns a new instance of AsyncWrapper.



2
3
4
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 2

def initialize
  @native = Java::com.droiuby.client.core.async.AsyncWrapper.new(_execution_bundle)
end

Instance Method Details

#before(&block) ⇒ Object



10
11
12
13
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 10

def before(&block)
  @native.setPre_execute(block)
  self
end

#done(&block) ⇒ Object



20
21
22
23
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 20

def done(&block)
  @native.setPost_execute(block)
  self
end

#executeObject



25
26
27
28
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 25

def execute
  @native.execute(nil, nil, nil)
  self
end

#nativeObject



6
7
8
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 6

def native
  @native
end

#perform(&block) ⇒ Object



15
16
17
18
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 15

def perform(&block)
  @native.setBackground_task(block)
  self
end

#startObject



30
31
32
# File 'lib/droiuby/wrappers/async_wrapper.rb', line 30

def start
  execute
end