Class: XMLRPC::Service::PublicInstanceMethodsInterface

Inherits:
BasicInterface
  • Object
show all
Defined in:
lib/xmlrpc/utils.rb

Overview

class Interface

Instance Attribute Summary

Attributes inherited from BasicInterface

#methods, #prefix

Instance Method Summary collapse

Methods inherited from BasicInterface

#add_method

Constructor Details

#initialize(prefix) ⇒ PublicInstanceMethodsInterface

Returns a new instance of PublicInstanceMethodsInterface.



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

def initialize(prefix)
  super(prefix)
end

Instance Method Details

#get_methods(obj, delim = ".") ⇒ Object



132
133
134
135
136
137
# File 'lib/xmlrpc/utils.rb', line 132

def get_methods(obj, delim=".")
  prefix = @prefix + delim
  obj.class.public_instance_methods(false).collect { |name|
    [prefix + name.to_s, obj.method(name).to_proc, nil, nil]
  }
end