Class: XMLRPC::Service::Interface
- Inherits:
-
BasicInterface
- Object
- BasicInterface
- XMLRPC::Service::Interface
- Defined in:
- lib/xmlrpc/utils.rb
Overview
Class which wraps a XMLRPC::Service::Interface definition, used by XMLRPC::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.
112 113 114 115 116 |
# File 'lib/xmlrpc/utils.rb', line 112 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
118 119 120 121 122 123 |
# File 'lib/xmlrpc/utils.rb', line 118 def get_methods(obj, delim=".") prefix = @prefix + delim @methods.collect { |name, meth, sig, help| [prefix + name.to_s, obj.method(meth).to_proc, sig, help] } end |