Class: XMLRPC::Service::BasicInterface
Overview
base class for Service Interface definitions, used by BasicServer#add_handler
Instance Attribute Summary (collapse)
-
- (Object) methods
readonly
Returns the value of attribute methods.
-
- (Object) prefix
readonly
Returns the value of attribute prefix.
Instance Method Summary (collapse)
- - (Object) add_method(sig, help = nil, meth_name = nil)
-
- (BasicInterface) initialize(prefix)
constructor
A new instance of BasicInterface.
Constructor Details
- (BasicInterface) initialize(prefix)
A new instance of BasicInterface
66 67 68 69 |
# File 'lib/xmlrpc/utils.rb', line 66 def initialize(prefix) @prefix = prefix @methods = [] end |
Instance Attribute Details
- (Object) methods (readonly)
Returns the value of attribute methods
64 65 66 |
# File 'lib/xmlrpc/utils.rb', line 64 def methods @methods end |
- (Object) prefix (readonly)
Returns the value of attribute prefix
64 65 66 |
# File 'lib/xmlrpc/utils.rb', line 64 def prefix @prefix end |
Instance Method Details
- (Object) add_method(sig, help = nil, meth_name = nil)
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/xmlrpc/utils.rb', line 71 def add_method(sig, help=nil, meth_name=nil) mname = nil sig = [sig] if sig.kind_of? String sig = sig.collect do |s| name, si = parse_sig(s) raise "Wrong signatures!" if mname != nil and name != mname mname = name si end @methods << [mname, meth_name || mname, sig, help] end |