examples/rinda_agent.rb in rubyonacid-0.3.1 vs examples/rinda_agent.rb in rubyonacid-0.4.0

- old
+ new

@@ -1,5 +1,7 @@ +#!/usr/bin/env ruby + require 'rubygems' begin require 'wx' rescue LoadError raise "It appears that wxruby is not installed. 'sudo gem install wxruby' to install it." @@ -11,15 +13,15 @@ WIDTH = 480 HEIGHT = 480 def on_init - @f = RubyOnAcid::RindaFactory.new(ARGV[0] || "druby://127.0.0.1:7632") + @f = RubyOnAcid::RindaFactory.new(:uri => ARGV[0] || "druby://127.0.0.1:7632") @f.default_factory = RubyOnAcid::ExampleFactory.new @f.start_service #A skip factory, in charge of randomly resetting the meta factory. - @resetter = RubyOnAcid::SkipFactory.new(0.999) + @resetter = RubyOnAcid::SkipFactory.new(:odds => 0.999) #Set up window. frame = Wx::Frame.new(nil, :size => [WIDTH, HEIGHT]) frame.show window = Wx::Window.new(frame, :size => [WIDTH, HEIGHT])