Project

General

Profile

Download (694 Bytes) Statistics
| Branch: | Tag: | Revision:
node 'Records' do

children = bot.services.records.class.public_instance_methods(false)
children.collect!{|i| i.camelize }

node children do
object_list = Proc.new do |*args|
obj_name, options = args
options ||= {}

bot.services.records.send(node_name.underscore, obj_name, options)
end

on_request do |request|
request.reply.results = object_list.call
end

attr_search_node do |criterias|
object_list.call(:search, :criterias => criterias, :format => :data_hash)
end

node object_list do
on_request do |request|
request.reply.results = object_list.call(node_name, :format => :data_hash)
end
end
end
end
    (1-1/1)