Module: Droonga::Deferrable

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#on_failure=(value) ⇒ Object

Sets the attribute on_failure

Parameters:

  • value

    the value to set the attribute on_failure to.



18
19
20
# File 'lib/droonga/deferrable.rb', line 18

def on_failure=(value)
  @on_failure = value
end

#on_ready=(value) ⇒ Object

Sets the attribute on_ready

Parameters:

  • value

    the value to set the attribute on_ready to.



18
19
20
# File 'lib/droonga/deferrable.rb', line 18

def on_ready=(value)
  @on_ready = value
end

Instance Method Details

#wait_until_ready(target) ⇒ Object



20
21
22
23
24
# File 'lib/droonga/deferrable.rb', line 20

def wait_until_ready(target)
  target.on_ready = lambda do
    on_ready
  end
end