Project

General

Profile

« Previous | Next » 

Revision 7466fc08

Added by Marc Dequènes almost 14 years ago

  • ID 7466fc083799a22deae3d56779823c810028f280

[evol] server API tree reworked using a DSL (reply handling rework is WIP)

View differences:

bin/librarian
include BotNet
def interface
LibrarianInterface.instance
end
end
class LibrarianInterface
include CyborgServerInterface
include CyborgServerRootInterfaceAddon
def setup
super
class Gruik
include CyborgServerInterface
def api_methods
["g1", "g2", "g3"]
define_interface "0.1~" do
node "Gruik" do
node ["g1", "g2", "g3"] do
on_request do |request|
request.reply.results = {
:plouf => ">>> #{node_name} <<<"
}
end
end
end
end
dynamic_interface {|node_name| ">>> #{node_name} <<<" }
end
end
end

Also available in: Unified diff