Class: XMLRPC::Service::Interface
- Inherits:
-
BasicInterface
- Object
- BasicInterface
- XMLRPC::Service::Interface
- Defined in:
- lib/xmlrpc/utils.rb
Overview
class which wraps a Service Interface definition, used by BasicServer#add_handler
Instance Attribute Summary
Attributes inherited from BasicInterface
Instance Method Summary collapse
- #get_methods(obj, delim = ".")) ⇒ Object
-
#initialize(prefix, &p) ⇒ Interface
constructor
A new instance of Interface.
Methods inherited from BasicInterface
Constructor Details
#initialize(prefix, &p) ⇒ Interface
Returns a new instance of Interface.
106 107 108 109 110 |
# File 'lib/xmlrpc/utils.rb', line 106 def initialize(prefix, &p) raise "No interface specified" if p.nil? super(prefix) instance_eval(&p) end |
Instance Method Details
#get_methods(obj, delim = ".")) ⇒ Object
112 113 114 115 116 117 |
# File 'lib/xmlrpc/utils.rb', line 112 def get_methods(obj, delim=".") prefix = @prefix + delim @methods.collect { |name, meth, sig, help| [prefix + name, obj.method(meth).to_proc, sig, help] } end |