You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mltpp/swig/ruby/miracle.rb

18 lines
361 B

require 'mltpp'
def command
puts "command"
end
def push
puts "push"
end
miracle = Mltpp::Miracle.new( "miracle-ruby", 5260 )
miracle.start
miracle.execute( "uadd sdl" )
listener = Mltpp::Listener.new( miracle, "command-received", method( :command ) )
listener = Mltpp::Listener.new( miracle, "push-received", method( :push ) )
miracle.wait_for_shutdown