static public Method

BlankSlate.reveal(name)

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

Source Code

# File 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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.