examples/echo_client.rb in ruby_skynet-0.6.0 vs examples/echo_client.rb in ruby_skynet-0.7.0

- old
+ new

@@ -1,10 +1,14 @@ # Allow examples to be run directly outside of the Gem $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib' require 'rubygems' require 'ruby_skynet' -SemanticLogger::Logger.default_level = :trace -SemanticLogger::Logger.appenders << SemanticLogger::Appender::File.new('echo_client.log') +SemanticLogger.default_level = :info +SemanticLogger.add_appender(STDOUT) -client = RubySkynet::Client.new('EchoService') -p client.call('echo', :hello => 'world') +class Echo < RubySkynet::Client + self.skynet_name = "EchoService" +end + +client = Echo.new +p client.echo(:hello => 'world')