123456789_123456789_123456789_123456789_123456789_

Class: XMLRPC::Service::Interface

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: XMLRPC::Service::BasicInterface
Defined in: lib/xmlrpc/utils.rb

Overview

Class which wraps a Interface definition, used by BasicServer#add_handler

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(prefix, &p) ⇒ Interface

[ GitHub ]

  
# 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 = ".")

[ GitHub ]

  
# 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

#meth(*a) (private)

[ GitHub ]

  
# File 'lib/xmlrpc/utils.rb', line 128

def meth(*a)
  add_method(*a)
end