class method self.hide

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.hide(name)

Hide the method named name in the BlankSlate class. Don’t hide instance_eval or any method beginning with “__”.

Parameters

name req
Source
# File activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb, line 22
    def hide(name)
      if instance_methods.include?(name.to_s) and
        name !~ /^(__|instance_eval)/
        @hidden_methods ||= {}
        @hidden_methods[name.to_sym] = instance_method(name)
        undef_method name
      end
    end

Defined in activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb line 22 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Builder::BlankSlate

Type at least 2 characters to search.

↑↓ navigate · open · esc close