Class: Rupy::BlankObject

Inherits:
BlankSlate
  • Object
show all
Defined in:
lib/rupy/blankobject.rb

Overview

An object to be used as a base class for Proxy classes. It is necessary to define this because no such class exists in Ruby 1.8.x

Direct Known Subclasses

PyMainClass, RubyPyProxy

Class Method Summary collapse

Class Method Details

.hide(name) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/rupy/blankobject.rb', line 9

def hide(name)
    if instance_methods.include?(name) and
        name.to_s !~ /^(__|instance_eval|object_id)/
        @hidden_methods ||= {}
        @hidden_methods[name.to_sym] = instance_method(name)
        undef_method name
    end
end