2b5afc0f9be8971afa625a48ebf25163fcf54696
[melted] / mlt++ / swig / ruby / miracle.rb
1 require 'mltpp'
2
3 def command
4 puts "command"
5 end
6
7 def push
8 puts "push"
9 end
10
11 miracle = Mltpp::Miracle.new( "miracle-ruby", 5260 )
12 miracle.start
13 miracle.execute( "uadd sdl" )
14 listener = Mltpp::Listener.new( miracle, "command-received", method( :command ) )
15 listener = Mltpp::Listener.new( miracle, "push-received", method( :push ) )
16 miracle.wait_for_shutdown
17