Created
July 24, 2012 16:31
-
-
Save omgitsads/3171050 to your computer and use it in GitHub Desktop.
Scamp V2 Test Adapter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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