Revision 8fcaacd6
Added by Marc Dequènes over 14 years ago
- ID 8fcaacd6b9f666dcfb94138e296b2c320fe9799f
bin/mapmaker | ||
---|---|---|
|
||
require 'cyborghood/cyborg'
|
||
require 'cyborghood/cyborg/server'
|
||
require 'cyborghood/services/dns'
|
||
|
||
|
||
module CyborgHood
|
||
... | ... | |
include CyborgServerInterface
|
||
include CyborgServerDefaultInterface
|
||
|
||
class DNS
|
||
class DNS < Services::DNS
|
||
include CyborgServerInterface
|
||
|
||
def zone_exists?(data)
|
||
pp data
|
||
"coucou"
|
||
export_parent_methods
|
||
unexport_method :zones
|
||
|
||
def test(data)
|
||
"coucou: " + data.inspect
|
||
end
|
||
|
||
class Zones
|
||
include CyborgServerInterface
|
||
|
||
def initialize
|
||
@dns = Services::DNS.new
|
||
end
|
||
|
||
def api_methods
|
||
@dns.zones
|
||
end
|
||
|
||
def method_missing(method_name, *args)
|
||
if api_methods.include?(method_name.to_s)
|
||
Zone.new(method_name.to_s)
|
||
else
|
||
super
|
||
end
|
||
end
|
||
|
||
class Zone < Services::Zone
|
||
include CyborgServerEmbededInterface
|
||
end
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
[evol] work on cyborg server protocol and API #7 (refs #31)