Skip to content

Instantly share code, notes, and snippets.

@omgitsads
Created July 24, 2012 16:31
Show Gist options
  • Save omgitsads/3171050 to your computer and use it in GitHub Desktop.
Save omgitsads/3171050 to your computer and use it in GitHub Desktop.
Scamp V2 Test Adapter
class TestAdapter < Scamp::Adapter
class Context
def say msg
puts msg
end
end
def connect!
EventMachine::PeriodicTimer.new(@opts[:delay]) do
msg = Scamp::Message.new(self, :body => "help")
context = TestAdapter::Context.new
push [context, msg]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment