class method self.reveal

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.reveal(name)

Redefine a previously hidden method so that it may be called on a blank slate object.

Parameters

name req
Source
# File activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb, line 38
    def reveal(name)
      bound_method = nil
      unbound_method = find_hidden_method(name)
      fail "Don't know how to reveal method '#{name}'" unless unbound_method
      define_method(name) do |*args|
        bound_method ||= unbound_method.bind(self)
        bound_method.call(*args)
      end
    end

Defined in activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb line 38 · 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