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.
113 114 115 116 117 |
# File 'lib/xmlrpc/utils.rb', line 113 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
119 120 121 122 123 124 |
# File 'lib/xmlrpc/utils.rb', line 119 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 |