Class: XMLRPC::Service::BasicInterface
- Inherits:
-
Object
- Object
- XMLRPC::Service::BasicInterface
- Defined in:
- lib/xmlrpc/utils.rb
Overview
Base class for XMLRPC::Service::Interface definitions, used by XMLRPC::BasicServer#add_handler
Direct Known Subclasses
Instance Attribute Summary collapse
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
- #add_method(sig, help = nil, meth_name = nil) ⇒ Object
-
#initialize(prefix) ⇒ BasicInterface
constructor
A new instance of BasicInterface.
Constructor Details
#initialize(prefix) ⇒ BasicInterface
Returns a new instance of BasicInterface.
73 74 75 76 |
# File 'lib/xmlrpc/utils.rb', line 73 def initialize(prefix) @prefix = prefix @methods = [] end |
Instance Attribute Details
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
71 72 73 |
# File 'lib/xmlrpc/utils.rb', line 71 def methods @methods end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
71 72 73 |
# File 'lib/xmlrpc/utils.rb', line 71 def prefix @prefix end |
Instance Method Details
#add_method(sig, help = nil, meth_name = nil) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/xmlrpc/utils.rb', line 78 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 |