Parent

Sinatra::Async::Test::AsyncSession::AsyncCloser

Public Class Methods

new() click to toggle source
# File lib/sinatra/async/test.rb, line 14
def initialize
  @callbacks, @errbacks = [], []
end

Public Instance Methods

callback(&b) click to toggle source
# File lib/sinatra/async/test.rb, line 17
def callback(&b)
  @callbacks << b
end
errback(&b) click to toggle source
# File lib/sinatra/async/test.rb, line 20
def errback(&b)
  @errbacks << b
end
fail() click to toggle source
# File lib/sinatra/async/test.rb, line 23
def fail
  @errbacks.each { |cb| cb.call }
  @errbacks.clear
end
succeed() click to toggle source
# File lib/sinatra/async/test.rb, line 27
def succeed
  @callbacks.each { |cb| cb.call }
  @callbacks.clear
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.