Permalink
Browse files

AS guide: removes docs for Object#tap, no longer in AS

  • Loading branch information...
1 parent 2ed5251 commit 169aaa6218dc7ee349f6ab706d16f179dbfbc0dd @fxn fxn committed Nov 9, 2009
Showing with 0 additions and 20 deletions.
  1. +0 −20 railties/guides/source/active_support_core_extensions.textile
@@ -94,26 +94,6 @@ def html_options_for_form(url_for_options, options, *parameters_for_url)
end
</ruby>
-See also "+Object#tap+":#tap.
-
-h4. +tap+
-
-+Object#tap+ exists in Ruby 1.8.7 and 1.9, and it is defined by Active Support for previous versions. This method yields its receiver to a block and returns it.
-
-For example, the following class method from +ActionDispatch::TestResponse+ creates, initializes, and returns a new test response using +tap+:
-
-<ruby>
-def self.from_response(response)
- new.tap do |resp|
- resp.status = response.status
- resp.headers = response.headers
- resp.body = response.body
- end
-end
-</ruby>
-
-See also "+Object#returning+":#returning.
-
h4. +try+
Sometimes you want to call a method provided the receiver object is not +nil+, which is something you usually check first.

0 comments on commit 169aaa6

Please sign in to comment.